aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/asset_pipeline.textile
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2011-06-28 08:22:38 +1000
committerRyan Bigg <radarlistener@gmail.com>2011-06-28 08:22:38 +1000
commit703b00947d745cbbe33f570762817151f8d7ef2b (patch)
treee46812d69cb40ed47ade64a77cfbc24884594389 /railties/guides/source/asset_pipeline.textile
parent49bb053b171f0da95be5a1ab72e7d79aa65dda1b (diff)
downloadrails-703b00947d745cbbe33f570762817151f8d7ef2b.tar.gz
rails-703b00947d745cbbe33f570762817151f8d7ef2b.tar.bz2
rails-703b00947d745cbbe33f570762817151f8d7ef2b.zip
[Asset pipeline] Move external assets section down to 'Adding assets to your gems' section
Diffstat (limited to 'railties/guides/source/asset_pipeline.textile')
-rw-r--r--railties/guides/source/asset_pipeline.textile8
1 files changed, 3 insertions, 5 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index 94c6cb9fb7..db13817535 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -37,10 +37,6 @@ Assets can be placed inside an application in one of three locations: +app/asset
Any subdirectory that exists within these three locations will be added to the search path for Sprockets (visible by calling +Rails.application.config.assets.paths+ in a console). When an asset is requested, these paths will be looked through to see if they contain an asset matching the name specified. Once an asset has been found, it's processed by Sprockets and then served up.
-h4. External Assets
-
-Assets can also come from external sources such as engines. A good example of this is the +jquery-rails+ gem which comes with Rails as the standard JavaScript library gem. This gem contains an engine class which inherits from +Rails::Engine+. By doing this, Rails is informed that the directory for this gem may contain assets and the +app/assets+, +lib/assets+ and +vendor/assets+ directories of this engine are added to the search path of Sprockets.
-
h4. Serving Assets
To serve assets, we can use the same tags that we are generally familiar with:
@@ -102,7 +98,9 @@ Sprockets also creates a "Gzip":http://en.wikipedia.org/wiki/Gzip (.gz) of your
h3. Adding Assets to Your Gems
-To include your assets inside of a gem, simple package it in +lib/assets+ as you would in +app/assets+. You should append or prepend the name of your gem though, this should help avoid name conflicts with other gems or the user's application.
+Assets can also come from external sources in the form of gems.
+
+A good example of this is the +jquery-rails+ gem which comes with Rails as the standard JavaScript library gem. This gem contains an engine class which inherits from +Rails::Engine+. By doing this, Rails is informed that the directory for this gem may contain assets and the +app/assets+, +lib/assets+ and +vendor/assets+ directories of this engine are added to the search path of Sprockets.
h3. Making Your Library or Gem a Pre-Processor