diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-14 03:57:24 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-14 03:57:24 -0700 |
commit | c4837f6ce3f9864c4b98c9051f99e1f0b428f9d6 (patch) | |
tree | 6e902ccc598cf02e2f28fcb4dab7145b01619357 /activerecord | |
parent | d49113023676fbf0b6653730f5bde759990caede (diff) | |
parent | 6d961242848ffe0eac69f190fd02f44aaeef3e0a (diff) | |
download | rails-c4837f6ce3f9864c4b98c9051f99e1f0b428f9d6.tar.gz rails-c4837f6ce3f9864c4b98c9051f99e1f0b428f9d6.tar.bz2 rails-c4837f6ce3f9864c4b98c9051f99e1f0b428f9d6.zip |
Merge pull request #554 from tomafro/reset-activerecord-runtime-before-each-request
ActiveRecord::LogSubscriber.runtime should be reset at the start of each request
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railties/controller_runtime.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/railties/controller_runtime.rb b/activerecord/lib/active_record/railties/controller_runtime.rb index bc6ca936c0..a0eecf4f46 100644 --- a/activerecord/lib/active_record/railties/controller_runtime.rb +++ b/activerecord/lib/active_record/railties/controller_runtime.rb @@ -9,6 +9,11 @@ module ActiveRecord attr_internal :db_runtime + def process_action(action, *args) + ActiveRecord::LogSubscriber.reset_runtime + super + end + def cleanup_view_runtime if ActiveRecord::Base.connected? db_rt_before_render = ActiveRecord::LogSubscriber.reset_runtime |