diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile index 4d052c16f3..4bedaa5a71 100644 --- a/railties/guides/source/asset_pipeline.textile +++ b/railties/guides/source/asset_pipeline.textile @@ -95,7 +95,18 @@ In addition to this single layer of pre-processing, we can also put on additiona Keep in mind that the order of these pre-processors is important. For example, if we called our JavaScript file +app/assets/javascripts/projects.js.erb.coffee+ then it would be processed with the CoffeeScript interpreter first, which wouldn't understand ERB and therefore we would run into problems. -h3. Compressing Assets +h3. Production Assets + +In the production environment, assets are served slightly differently to how they are served in the development environment. + +TODO: Talk here about: + * Rack::Cache's caching + * Sprocket's auto-generated MD5 hashes + * Sass-rails's handy +image_url+ helpers + * ERB pre-processing and +asset_url+ + + +h4. Compressing Assets The default Gemfile also includes the "uglifier":https://github.com/lautis/uglifier gem. This gem wraps "UglifierJS":https://github.com/mishoo/UglifyJS (written for NodeJS) in Ruby. It compress your code by removing white spaces and other magical things like changing your if and else statements to ternary operators when possible.