aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-10-02 12:33:14 -0700
committerXavier Noria <fxn@hashref.com>2011-10-02 12:33:14 -0700
commitac1fc5c59499db8d3e875bbd76e0b7c2c9240089 (patch)
tree8703e0f4b36dc55a694644d2f7f664b839622902 /railties
parent6e00c05607c03eead00966a5de4769b2e77af196 (diff)
downloadrails-ac1fc5c59499db8d3e875bbd76e0b7c2c9240089.tar.gz
rails-ac1fc5c59499db8d3e875bbd76e0b7c2c9240089.tar.bz2
rails-ac1fc5c59499db8d3e875bbd76e0b7c2c9240089.zip
rewords the docs of config.assets.initialize_on_precompile in the asset pipeline guide
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/asset_pipeline.textile14
1 files changed, 8 insertions, 6 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index da0ffb80d2..7795b297f3 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -346,12 +346,14 @@ The rake task is:
bundle exec rake assets:precompile
</plain>
-Asset templates in general have access to application objects. You may prevent application
-initialization in precompilation setting +config.assets.initialize_on_precompile+ to false.
-
-WARNING: Application objects may still be in scope in asset templates in develoment mode.
-If +config.assets.initialize_on_precompile+ is set to false it is your responsability not
-to use them at all.
+For faster asset precompiles, you can partially load your application by setting
++config.assets.initialize_on_precompile+ to false, though in that case templates
+cannot see application objects or methods. *Heroku requires this to be false.*
+
+WARNING: If you set +config.assets.initialize_on_precompile+ to false, be sure to
+test +rake assets:precompile+ locally before deploying. It may expose bugs where
+your assets reference application objects or methods, since those are still
+in scope in development mode regardless of the value of this flag.
Capistrano (v2.8.0 and above) has a recipe to handle this in deployment. Add the following line to +Capfile+: