documents config.assets.initialize_on_precompile in the asset pipeline guide

This commit is contained in:
Xavier Noria 2011-10-02 11:35:41 -07:00
parent c1547fcf6d
commit 6e00c05607
1 changed files with 7 additions and 0 deletions

View File

@ -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>