aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
diff options
context:
space:
mode:
authorArthur Neves <arthurnn@gmail.com>2016-05-25 00:14:39 -0400
committerArthur Neves <arthurnn@gmail.com>2016-05-25 00:14:39 -0400
commit028748945b7a3bb15555b90a58905190c601a15b (patch)
treec8c355803251a7eefe9bd6fa751e5881f99e68df /activerecord/lib/active_record/connection_adapters/abstract
parent779ccf8a0e6a8bf7bb362c30dac4a340599ab113 (diff)
downloadrails-028748945b7a3bb15555b90a58905190c601a15b.tar.gz
rails-028748945b7a3bb15555b90a58905190c601a15b.tar.bz2
rails-028748945b7a3bb15555b90a58905190c601a15b.zip
Add to_hash to specification
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb3
1 files changed, 1 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 ca04058539..c341773be1 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -911,8 +911,7 @@ module ActiveRecord
# A connection was established in an ancestor process that must have
# subsequently forked. We can't reuse the connection, but we can copy
# the specification and establish a new connection with it.
- spec = ancestor_pool.spec
- establish_connection(spec.config.merge("name" => spec.name)).tap do |pool|
+ establish_connection(ancestor_pool.spec.to_hash).tap do |pool|
pool.schema_cache = ancestor_pool.schema_cache if ancestor_pool.schema_cache
end
else