Permalink
Browse files

documents config.assets.initialize_on_precompile in the asset pipelin…

…e guide
  • Loading branch information...
1 parent d2219c5 commit 27ec2d38d81f862a633b7d8432ab84bc9e291c44 @fxn fxn committed Oct 2, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 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>

1 comment on commit 27ec2d3

@josevalim
Member

Bro, thanks (and sorry) again for adding the guides docs after my commits.

Please sign in to comment.