We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4565de0 commit 160cc33Copy full SHA for 160cc33
activerecord/lib/active_record/query_cache.rb
@@ -40,7 +40,7 @@ def self.install_executor_hooks(executor = ActiveSupport::Executor)
40
executor.register_hook(self)
41
42
executor.to_complete do
43
- unless ActiveRecord::Base.connection.transaction_open?
+ unless ActiveRecord::Base.connected? && ActiveRecord::Base.connection.transaction_open?
44
ActiveRecord::Base.clear_active_connections!
45
end
46
0 commit comments