To run the first code you tried you need to add the .erb extension. Otherwise, it's like running ruby code in a css/html file or whatever. It doesn't work :)
The assets pipeline works like this: example.css.scss => Interprets scss first and serves the css file. example.html.erb => interprets erb first and serves the html file. example.css.scss.erb => interprets erb first, then scss and serves the css file to the client. ... and so on. The "image-url()" code that kbedell suggested above works because it's a scss helper method for rails. Hope that clears things up a bit :) Cheers! Den onsdagen den 11:e april 2012 kl. 22:48:16 UTC+2 skrev Ruby-Forum.com User: > > that worked for me :) yeah.. you made my evening! thanks > > -- > Posted via http://www.ruby-forum.com/. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/HS1x4XBm_8AJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

