We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d467efc commit be77bc5Copy full SHA for be77bc5
lib/cypress-rails/manages_transactions.rb
@@ -55,7 +55,14 @@ def initialize
55
def gather_connections
56
setup_shared_connection_pool
57
58
- ActiveRecord::Base.connection_handler.connection_pool_list.map(&:connection)
+ ActiveRecord::Base.connection_handler.connection_pool_list.map do |pool|
59
+ # Rails 7.2+
60
+ if pool.respond_to?(:lease_connection)
61
+ pool.lease_connection
62
+ else
63
+ pool.connection
64
+ end
65
66
end
67
68
# Shares the writing connection pool with connections on
0 commit comments