aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-08-03 06:43:03 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-08-03 06:43:03 +0900
commit2088b10b1fcce969c7d03fe4b2297442f1d02174 (patch)
treee00a10e0c1290d6f3dc2ed823366b0b693e53907 /activerecord
parentbba4d2dd8ce6a0616a0b5d6458a528abd06caa98 (diff)
downloadrails-2088b10b1fcce969c7d03fe4b2297442f1d02174.tar.gz
rails-2088b10b1fcce969c7d03fe4b2297442f1d02174.tar.bz2
rails-2088b10b1fcce969c7d03fe4b2297442f1d02174.zip
`retrieve_connection_pool` return a pool, not a connection
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
index c730584902..f721e91203 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -1011,8 +1011,8 @@ module ActiveRecord
# Returns true if a connection that's accessible to this class has
# already been opened.
def connected?(spec_name)
- conn = retrieve_connection_pool(spec_name)
- conn && conn.connected?
+ pool = retrieve_connection_pool(spec_name)
+ pool && pool.connected?
end
# Remove the connection for this class. This will close the active