aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2011-06-28 08:09:04 +1000
committerRyan Bigg <radarlistener@gmail.com>2011-06-28 08:09:04 +1000
commitfb7ea76c1b44dc8c642b2bbedf83691d4cc0c387 (patch)
treee4353d024e0cada0fc5fc2db88ecfcbf39301dfd
parent22b508d961ac14df2504cd755178e8bc52961af3 (diff)
downloadrails-fb7ea76c1b44dc8c642b2bbedf83691d4cc0c387.tar.gz
rails-fb7ea76c1b44dc8c642b2bbedf83691d4cc0c387.tar.bz2
rails-fb7ea76c1b44dc8c642b2bbedf83691d4cc0c387.zip
[asset pipeline] Mention that hashed files are also picked up by Sprockets
-rw-r--r--railties/guides/source/asset_pipeline.textile4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index c9588b98d8..f6e28a20c8 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -49,7 +49,9 @@ To serve assets, we can use the same tags that we are generally familiar with:
<%= image_tag "rails.png" %>
</erb>
-Providing that assets are enabled within our application (+config.assets.enabled+ in your environment is set to +true+), this file will be served by Sprockets unless a file at +public/assets/rails.png+ exists, in which case that file will be served. Otherwise, Sprockets will look through the available paths until it finds a file that matches the name and then will serve it, first looking in the application's assets directories and then falling back to the various engines of the application.
+Providing that assets are enabled within our application (+config.assets.enabled+ in your environment is set to +true+), this file will be served by Sprockets unless a file at +public/assets/rails.png+ exists, in which case that file will be served. Alternatively, a file with an MD5 hash after its name such as +public/assets/rails-af27b6a414e6da00003503148be9b409.png+ will also be picked up by Sprockets.
+
+Otherwise, Sprockets will look through the available paths until it finds a file that matches the name and then will serve it, first looking in the application's assets directories and then falling back to the various engines of the application.
Sprockets does not add any new methods to require your assets, we still use the familiar +javascript_include_tag+ and +stylesheet_link_tag+. You can use it to include from the normal public directory or the assets directory.