aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-08-23 10:22:17 -0300
committerJosé Valim <jose.valim@gmail.com>2012-08-23 10:24:19 -0300
commite8eb68c19a423362f7c5fc3fea09803367d764d4 (patch)
tree5e97264d22cb2c77024711c696056a832ecee423 /railties/lib/rails
parent16fbe6f3e3f10d8f4bc72c3b7b9e5e35df2ee3a4 (diff)
downloadrails-e8eb68c19a423362f7c5fc3fea09803367d764d4.tar.gz
rails-e8eb68c19a423362f7c5fc3fea09803367d764d4.tar.bz2
rails-e8eb68c19a423362f7c5fc3fea09803367d764d4.zip
Fix failure on middleware/exceptions_test
The reason the test was failing was because when the test invokes `app.config`, the app is loaded and, as `eager_load` is set to true, it disables the dependency loading mechanism, so controllers that are later defined are not loaded.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/application/finisher.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb
index 1952a0fc3a..777f0d269e 100644
--- a/railties/lib/rails/application/finisher.rb
+++ b/railties/lib/rails/application/finisher.rb
@@ -91,7 +91,7 @@ module Rails
# Disable dependency loading during request cycle
initializer :disable_dependency_loading do
- if config.eager_load
+ if config.eager_load && config.cache_classes
ActiveSupport::Dependencies.unhook!
end
end