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,951
  • 4
  • 57
  • 77
xnjiang
  • 607
  • 6
  • 16

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
  • 8,039
  • 12
  • 55
  • 107