Browse files

fixes CSS example in the asset pipeline guide

  • Loading branch information...
fxn committed Sep 2, 2011
1 parent eeda840 commit 5912ed99029f76b3ec51955f05323b77fa0b22f2
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/asset_pipeline.textile
@@ -147,7 +147,7 @@ h5. CSS and ERB
If you add an +erb+ extension to a CSS asset, making it something such as +application.css.erb+, then you can use the +asset_path+ helper in your CSS rules:
-.class { background-image: <%= asset_path 'image.png' %> }
+.class { background-image: url(<%= asset_path 'image.png' %>) }
This writes the path to the particular asset being referenced. In this example, it would make sense to have an image in one of the asset load paths, such as +app/assets/images/image.png+, which would be referenced here. If this image is already available in +public/assets+ as a fingerprinted file, then that path is referenced.

0 comments on commit 5912ed9

Please sign in to comment.