diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-07 19:05:50 -0300 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2014-04-08 15:14:58 +0930 |
commit | e533826f483d6a1f45d044a2017ff4e9d19a154e (patch) | |
tree | b36a1aa2faa1b7f476344749daf35cd8060714a2 /activerecord/lib | |
parent | 2b817cde622e625f08a638d909f3e9b12f0b3066 (diff) | |
download | rails-e533826f483d6a1f45d044a2017ff4e9d19a154e.tar.gz rails-e533826f483d6a1f45d044a2017ff4e9d19a154e.tar.bz2 rails-e533826f483d6a1f45d044a2017ff4e9d19a154e.zip |
Make sure DEFAULT_URL only override current environment database
configuration
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_handling.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb index 5a83797ee5..567d121091 100644 --- a/activerecord/lib/active_record/connection_handling.rb +++ b/activerecord/lib/active_record/connection_handling.rb @@ -78,7 +78,7 @@ module ActiveRecord end env_url ||= ENV["DATABASE_URL_#{key.upcase}"] entry ||= {} if env_url - entry.merge!("url" => env_url) { |h, v1, v2| v1 || v2 } if entry.is_a?(Hash) + entry.merge!("url" => env_url) { |h, v1, v2| v1 || v2 } if entry.is_a?(Hash) && env_url hash[key] = entry if entry end |