Permalink
Browse files

Merge pull request #4592 from jviney/master

Fix setting $rails_rake_task variable.
  • Loading branch information...
2 parents 310c43c + 1d9357d commit cd32d408e15c7d91b813f5d70dc4311548925b8d @josevalim josevalim committed Jan 22, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 railties/lib/rails/application/finisher.rb
@@ -2,7 +2,6 @@ module Rails
class Application
module Finisher
include Initializable
- $rails_rake_task = nil
initializer :add_generator_templates do
config.generators.templates.unshift(*paths["lib/templates"].existent)
@@ -49,7 +48,7 @@ module Finisher
end
initializer :eager_load! do
- if config.cache_classes && !$rails_rake_task
+ if config.cache_classes && !(defined?($rails_rake_task) && $rails_rake_task)
ActiveSupport.run_load_hooks(:before_eager_load, self)
eager_load!
end

0 comments on commit cd32d40

Please sign in to comment.