diff options
author | Xavier Noria <fxn@hashref.com> | 2011-08-17 17:30:47 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-08-17 17:30:47 -0700 |
commit | 12c0ea954ae1245013902c485d5d3e794381e3df (patch) | |
tree | 1b233642f0ed74cd80eb1cacf64a828b453323e7 /railties/guides/source/asset_pipeline.textile | |
parent | 3b5eb11664b8257d35dced58f1d65e34fa4a6c1f (diff) | |
parent | 6783ce0de4511e2568765f2e4919758d70690391 (diff) | |
download | rails-12c0ea954ae1245013902c485d5d3e794381e3df.tar.gz rails-12c0ea954ae1245013902c485d5d3e794381e3df.tar.bz2 rails-12c0ea954ae1245013902c485d5d3e794381e3df.zip |
Merge branch 'master' of https://github.com/lifo/docrails
Diffstat (limited to 'railties/guides/source/asset_pipeline.textile')
-rw-r--r-- | railties/guides/source/asset_pipeline.textile | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile index 74a9e497f2..8094ba18f2 100644 --- a/railties/guides/source/asset_pipeline.textile +++ b/railties/guides/source/asset_pipeline.textile @@ -27,7 +27,6 @@ config.assets.enabled = false It is recommended that you use the defaults for all new apps. - h4. Main Features The first feature of the pipeline is to concatenate assets. This is important in a production environment, as it reduces the number of requests that a browser must make to render a web page. While Rails already has a feature to concatenate these types of assetsi -- by placing +:cache => true+ at the end of tags such as +javascript_include_tag+ and +stylesheet_link_tag+ -- many people do not use it. @@ -80,7 +79,6 @@ More reading: * "Optimize caching":http://code.google.com/speed/page-speed/docs/caching.html * "Revving Filenames: don’t use querystring":http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/ - h3. How to Use the Asset Pipeline In previous versions of Rails, all assets were located in subdirectories of +public+ such as +images+, +javascripts+ and +stylesheets+. With the asset pipeline, the preferred location for these assets is now the +app/assets+ directory. Files in this directory are served by the Sprockets middleware included in the sprockets gem. @@ -324,7 +322,6 @@ When files are precompiled, Sprockets also creates a "Gzip":http://en.wikipedia. TODO: Apache instructions - h3. Customizing the Pipeline @@ -372,7 +369,6 @@ To enable this, pass a +new+ Object to the config option in +application.rb+: config.assets.css_compressor = Transformer.new </erb> - h4. Changing the _assets_ Path The public path that Sprockets uses by default is +/assets+. |