aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-09-03 01:36:57 +0200
committerXavier Noria <fxn@hashref.com>2011-09-03 01:36:57 +0200
commit5912ed99029f76b3ec51955f05323b77fa0b22f2 (patch)
tree71df72f5a2cee6b95c03e18de3c4e1bfb4dc52ab
parenteeda8403fd222c1109618834e4fe31a45e6531ca (diff)
downloadrails-5912ed99029f76b3ec51955f05323b77fa0b22f2.tar.gz
rails-5912ed99029f76b3ec51955f05323b77fa0b22f2.tar.bz2
rails-5912ed99029f76b3ec51955f05323b77fa0b22f2.zip
fixes CSS example in the asset pipeline guide
-rw-r--r--railties/guides/source/asset_pipeline.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index 192c393dca..6935533f4a 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/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:
<plain>
-.class { background-image: <%= asset_path 'image.png' %> }
+.class { background-image: url(<%= asset_path 'image.png' %>) }
</plain>
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.