aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2011-06-28 08:25:14 +1000
committerRyan Bigg <radarlistener@gmail.com>2011-06-28 08:25:14 +1000
commit6a1803a14f069d7bd0138510129693874bd84938 (patch)
tree286172ac3d6e8bdf8def16950a9680aebd2258ea /railties/guides
parent9959fa2d155164e6c9f286fd4bcf8c4ab130951e (diff)
downloadrails-6a1803a14f069d7bd0138510129693874bd84938.tar.gz
rails-6a1803a14f069d7bd0138510129693874bd84938.tar.bz2
rails-6a1803a14f069d7bd0138510129693874bd84938.zip
[asset pipeline] Add production assets section
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/asset_pipeline.textile13
1 files changed, 12 insertions, 1 deletions
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.