Rails 3.1 and Image Assets

后端 未结 7 1959
深忆病人
深忆病人 2020-11-30 16:53

I have put all my images for my admin theme in the assets folder within a folder called admin. Then I link to it like normal ie.

# Ruby    
image_tag \"admin         


        
7条回答
  •  忘掉有多难
    2020-11-30 17:31

    In rails 4 you can now use a css and sass helper image-url:

    div.logo {background-image: image-url("logo.png");}
    

    If your background images aren't showing up consider looking at how you're referencing them in your stylesheets.

提交回复
热议问题