diff options
author | Xavier Noria <fxn@hashref.com> | 2011-10-02 11:35:41 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-10-02 11:35:58 -0700 |
commit | 6e00c05607c03eead00966a5de4769b2e77af196 (patch) | |
tree | 24d8960a3c5beec3ba58816ee0fca5e79f274cf7 | |
parent | c1547fcf6d3920e81a56ed032c49ab75faf562d8 (diff) | |
download | rails-6e00c05607c03eead00966a5de4769b2e77af196.tar.gz rails-6e00c05607c03eead00966a5de4769b2e77af196.tar.bz2 rails-6e00c05607c03eead00966a5de4769b2e77af196.zip |
documents config.assets.initialize_on_precompile in the asset pipeline guide
-rw-r--r-- | railties/guides/source/asset_pipeline.textile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile index a0af018d30..da0ffb80d2 100644 --- a/railties/guides/source/asset_pipeline.textile +++ b/railties/guides/source/asset_pipeline.textile @@ -346,6 +346,13 @@ 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. + Capistrano (v2.8.0 and above) has a recipe to handle this in deployment. Add the following line to +Capfile+: <erb> |