aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2018-03-31 16:58:54 -0400
committerGitHub <noreply@github.com>2018-03-31 16:58:54 -0400
commit11b884e53455ae0eb95835b88e20c369b7c708dd (patch)
tree362b3c17f8ca367b64fb637feeb7f4534433b3a2 /activerecord/lib/active_record
parent088cf2693944bd7acf28da0371c3a3ffbcf83822 (diff)
parent726e21e86ef092ebf8199041ba24ba492baca27f (diff)
downloadrails-11b884e53455ae0eb95835b88e20c369b7c708dd.tar.gz
rails-11b884e53455ae0eb95835b88e20c369b7c708dd.tar.bz2
rails-11b884e53455ae0eb95835b88e20c369b7c708dd.zip
Merge pull request #32396 from eugeneius/database_configurations_url
Fix two-level database configurations with URLs
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/database_configurations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/database_configurations.rb b/activerecord/lib/active_record/database_configurations.rb
index 1c7a5d1347..09aef62753 100644
--- a/activerecord/lib/active_record/database_configurations.rb
+++ b/activerecord/lib/active_record/database_configurations.rb
@@ -43,7 +43,7 @@ module ActiveRecord
# Given an env, spec and config creates DatabaseConfig structs with
# each attribute set.
def self.walk_configs(env_name, spec_name, config) # :nodoc:
- if config["database"] || env_name == "default"
+ if config["database"] || config["url"] || env_name == "default"
DatabaseConfig.new(env_name, spec_name, config)
else
config.each_pair.map do |sub_spec_name, sub_config|