Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added some docs to controller runtime.

  • Loading branch information...
commit e7e1d83ddfceeddd890ecd251bf81e18d3b553cb 1 parent c4837f6
José Valim josevalim authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 activerecord/lib/active_record/railties/controller_runtime.rb
5 activerecord/lib/active_record/railties/controller_runtime.rb
View
@@ -2,7 +2,7 @@
module ActiveRecord
module Railties
- module ControllerRuntime
+ module ControllerRuntime #:nodoc:
extend ActiveSupport::Concern
protected
@@ -10,6 +10,9 @@ module ControllerRuntime
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
Please sign in to comment.
Something went wrong with that request. Please try again.