aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/core.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-09 14:37:51 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-09 14:37:51 -0800
commit8a5b480ebb46215210294b87a7ed9f1d8a032312 (patch)
treeec1fb7f43ce710fa4d571d92241dc06a7b334d20 /activerecord/lib/active_record/core.rb
parentda65fe9e11b7f445847228753e6df46d376e29ab (diff)
parent6cc03675d30b58e28f585720dad14e947a57ff5b (diff)
downloadrails-8a5b480ebb46215210294b87a7ed9f1d8a032312.tar.gz
rails-8a5b480ebb46215210294b87a7ed9f1d8a032312.tar.bz2
rails-8a5b480ebb46215210294b87a7ed9f1d8a032312.zip
Merge pull request #13582 from schneems/schneems/preserve-connection-behavior
Ensure Active Record connection consistency
Diffstat (limited to 'activerecord/lib/active_record/core.rb')
-rw-r--r--activerecord/lib/active_record/core.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index 18ee77f6fe..cd8690d500 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -42,9 +42,16 @@ module ActiveRecord
# 'database' => 'db/production.sqlite3'
# }
# }
- mattr_accessor :configurations, instance_writer: false
+ def self.configurations=(config)
+ @@configurations = ActiveRecord::ConnectionHandling::MergeAndResolveDefaultUrlConfig.new(config).resolve
+ end
self.configurations = {}
+ # Returns fully resolved configurations hash
+ def self.configurations
+ @@configurations
+ end
+
##
# :singleton-method:
# Determines whether to use Time.utc (using :utc) or Time.local (using :local) when pulling