Skip to content
This repository
Browse code

[Asset pipeline] Move external assets section down to 'Adding assets …

…to your gems' section
  • Loading branch information...
commit 703b00947d745cbbe33f570762817151f8d7ef2b 1 parent 49bb053
Ryan Bigg radar authored

Showing 1 changed file with 3 additions and 5 deletions. Show diff stats Hide diff stats

  1. +3 5 railties/guides/source/asset_pipeline.textile
8 railties/guides/source/asset_pipeline.textile
Source Rendered
@@ -37,10 +37,6 @@ Assets can be placed inside an application in one of three locations: +app/asset
37 37
38 38 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.
39 39
40   -h4. External Assets
41   -
42   -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.
43   -
44 40 h4. Serving Assets
45 41
46 42 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
102 98
103 99 h3. Adding Assets to Your Gems
104 100
105   -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.
  101 +Assets can also come from external sources in the form of gems.
  102 +
  103 +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.
106 104
107 105 h3. Making Your Library or Gem a Pre-Processor
108 106

0 comments on commit 703b009

Please sign in to comment.
Something went wrong with that request. Please try again.