aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/lib/dispatcher.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/dispatcher.rb b/railties/lib/dispatcher.rb
index 49bdd093c4..680b03fb42 100644
--- a/railties/lib/dispatcher.rb
+++ b/railties/lib/dispatcher.rb
@@ -41,7 +41,7 @@ class Dispatcher
ActiveRecord::Base.reset_associations_loaded
if ActionController::Base.reload_dependencies
- Object.send(:remove_const, "AbstractApplicationController")
+ Object.send(:remove_const, "AbstractApplicationController") if Object.const_defined?(:AbstractApplicationController)
Object.send(:remove_const, controller_class_name(controller_name)) if Object.const_defined?(controller_class_name(controller_name))
end
end