diff options
author | José Valim <jose.valim@gmail.com> | 2011-10-02 12:14:31 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-10-02 12:15:21 +0200 |
commit | 753424079e497d8ab7bc611093a34194200e3c7c (patch) | |
tree | 120e1b753e24a52d326829c55de6d40bf7937281 /actionpack | |
parent | 1efe41dc366d21123842dea34ba95ddf1ab284d4 (diff) | |
download | rails-753424079e497d8ab7bc611093a34194200e3c7c.tar.gz rails-753424079e497d8ab7bc611093a34194200e3c7c.tar.bz2 rails-753424079e497d8ab7bc611093a34194200e3c7c.zip |
Provide initialize_on_precompile which, when set to false, does not initialize the app for precompilation. Defaults to true.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/sprockets/assets.rake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake index bb5cf6740a..7b86d84a27 100644 --- a/actionpack/lib/sprockets/assets.rake +++ b/actionpack/lib/sprockets/assets.rake @@ -54,7 +54,11 @@ namespace :assets do end task :environment do - Rails.application.initialize!(:assets) - Sprockets::Bootstrap.new(Rails.application).run + if Rails.application.config.assets.initialize_on_precompile + Rake::Task["environment"].invoke + else + Rails.application.initialize!(:assets) + Sprockets::Bootstrap.new(Rails.application).run + end end end |