Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Let ApplicationController stay unloaded for as long as possible

  • Loading branch information...
commit a026b4c983681b71d876ea37958c3e5bc605acac 1 parent e50530c
@dhh dhh authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 actionpack/lib/action_controller/dispatcher.rb
View
4 actionpack/lib/action_controller/dispatcher.rb
@@ -12,8 +12,6 @@ def define_dispatcher_callbacks(cache_classes)
after_dispatch :cleanup_application
end
- to_prepare(:load_application_controller) { ApplicationController }
-
if defined?(ActiveRecord)
after_dispatch :checkin_connections
to_prepare(:activerecord_instantiate_observers) { ActiveRecord::Base.instantiate_observers }
@@ -178,7 +176,7 @@ def handle_request
def failsafe_rescue(exception)
self.class.failsafe_response(@output, '500 Internal Server Error', exception) do
- if @controller ||= defined?(::ApplicationController) ? ::ApplicationController : Base
+ if @controller ||= (::ApplicationController rescue Base)
@controller.process_with_exception(@request, @response, exception).out(@output)
else
raise exception
Please sign in to comment.
Something went wrong with that request. Please try again.