21

I am using ember with rails. I want to get image path in rails asset pipeline. Does emberjs has any function like asset-path in sass-rails?

New Alexandria
  • 6,369
  • 4
  • 50
  • 71
xnjiang
  • 597
  • 4
  • 15

1 Answers1

1

This is hardly ideal, but for lack of a better solution I've been handling this in my css:

.logo{
   background-image: url(image_path('logo.png'))
 }

This approach is often fine, but it has drawbacks. There's an excellent Stackoverflow discussion of using img tags vs background-image here.

Community
  • 1
  • 1
nullnullnull
  • 7,579
  • 12
  • 48
  • 101