From e7e1d83ddfceeddd890ecd251bf81e18d3b553cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 14 May 2011 03:59:14 -0700 Subject: [PATCH] Added some docs to controller runtime. --- .../lib/active_record/railties/controller_runtime.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/railties/controller_runtime.rb b/activerecord/lib/active_record/railties/controller_runtime.rb index a0eecf4f46..9e3b3429e4 100644 --- a/activerecord/lib/active_record/railties/controller_runtime.rb +++ b/activerecord/lib/active_record/railties/controller_runtime.rb @@ -2,7 +2,7 @@ require 'active_support/core_ext/module/attr_internal' module ActiveRecord module Railties - module ControllerRuntime + module ControllerRuntime #:nodoc: extend ActiveSupport::Concern protected @@ -10,6 +10,9 @@ module ActiveRecord attr_internal :db_runtime def process_action(action, *args) + # We also need to reset the runtime before each action + # because of queries in middleware or in cases we are streaming + # and it won't be cleaned up by the method below. ActiveRecord::LogSubscriber.reset_runtime super end