diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/dispatcher.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/dispatcher.rb b/actionpack/lib/action_controller/dispatcher.rb index e06c2ebe36..8c5a73c2f5 100644 --- a/actionpack/lib/action_controller/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatcher.rb @@ -99,6 +99,12 @@ module ActionController after_dispatch :flush_logger after_dispatch :cleanup_application + if defined? ActiveRecord + to_prepare :activerecord_instantiate_observers do + ActiveRecord::Base.instantiate_observers + end + end + def initialize(output, request = nil, response = nil) @output, @request, @response = output, request, response end |