aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2011-09-02 17:10:11 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2011-09-02 17:10:11 -0500
commit1b8290db527e29c6b503cb036bc42d67368f766c (patch)
tree962ed953bd39ae528313857ee4a71b7cee880a70
parent5b7bcb4959a33d7a31acdd2823eb3272bcd1f322 (diff)
downloadrails-1b8290db527e29c6b503cb036bc42d67368f766c.tar.gz
rails-1b8290db527e29c6b503cb036bc42d67368f766c.tar.bz2
rails-1b8290db527e29c6b503cb036bc42d67368f766c.zip
Fix asset_path example in CSS and ERB section
-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 ef35d1ed76..82aa0a5256 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.