Browse files

rewords the docs of config.assets.initialize_on_precompile in the ass…

…et pipeline guide
  • Loading branch information...
1 parent 27ec2d3 commit d94aa10918178406700e1287040252408f6bdf10 @fxn fxn committed Oct 2, 2011
Showing with 8 additions and 6 deletions.
  1. +8 −6 railties/guides/source/asset_pipeline.textile
@@ -346,12 +346,14 @@ The rake task is:
bundle exec rake assets:precompile
-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+:

0 comments on commit d94aa10

Please sign in to comment.