aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-01-21 23:36:14 -0800
committerJosé Valim <jose.valim@gmail.com>2012-01-21 23:36:14 -0800
commitcd32d408e15c7d91b813f5d70dc4311548925b8d (patch)
tree6d7e62232cbbe1cf03ff40c1f1b76a9771f3225c /railties/lib
parent310c43c129e5ad1bb68dc60ff14fdda86ad9fd07 (diff)
parent1d9357df3b30a3aa5a2418b0fe68aeacbb111500 (diff)
downloadrails-cd32d408e15c7d91b813f5d70dc4311548925b8d.tar.gz
rails-cd32d408e15c7d91b813f5d70dc4311548925b8d.tar.bz2
rails-cd32d408e15c7d91b813f5d70dc4311548925b8d.zip
Merge pull request #4592 from jviney/master
Fix setting $rails_rake_task variable.
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/application/finisher.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb
index b9944bed26..7da495211d 100644
--- a/railties/lib/rails/application/finisher.rb
+++ b/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 Rails
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