diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-22 13:24:37 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-22 13:24:37 +0100 |
commit | a026b4c983681b71d876ea37958c3e5bc605acac (patch) | |
tree | 1ca9f066e6a89a71d34a703f1d329943b6292c81 /actionpack/lib/action_controller | |
parent | e50530ca3ab5db53ebc74314c54b62b91b932389 (diff) | |
download | rails-a026b4c983681b71d876ea37958c3e5bc605acac.tar.gz rails-a026b4c983681b71d876ea37958c3e5bc605acac.tar.bz2 rails-a026b4c983681b71d876ea37958c3e5bc605acac.zip |
Let ApplicationController stay unloaded for as long as possible
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/dispatcher.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/dispatcher.rb b/actionpack/lib/action_controller/dispatcher.rb index d93edf067c..1c7a4b0545 100644 --- a/actionpack/lib/action_controller/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatcher.rb @@ -12,8 +12,6 @@ module ActionController 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 @@ module ActionController 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 |