diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2019-03-18 19:58:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-18 19:58:42 -0400 |
commit | 6e94127dd21271f3fcebc865c23974a75de20f3c (patch) | |
tree | 7aa8745041f98818abda264227ab1dbe55d5b80b /activerecord/lib | |
parent | ded9a154241989cc65f4f38d7c9643f2cdf01a65 (diff) | |
parent | 8f3066fccc3b80fa3bfaa2830858f61f046bd61a (diff) | |
download | rails-6e94127dd21271f3fcebc865c23974a75de20f3c.tar.gz rails-6e94127dd21271f3fcebc865c23974a75de20f3c.tar.bz2 rails-6e94127dd21271f3fcebc865c23974a75de20f3c.zip |
Merge pull request #35663 from eileencodes/fix-database-configuration-when-not-actually-a-three-tier
Fix database configuration when adding another config level
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/database_configurations.rb | 2 |
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 a6c702cbbc..4656045fe5 100644 --- a/activerecord/lib/active_record/database_configurations.rb +++ b/activerecord/lib/active_record/database_configurations.rb @@ -106,7 +106,7 @@ module ActiveRecord build_db_config = configs.each_pair.flat_map do |env_name, config| walk_configs(env_name.to_s, "primary", config) - end.compact + end.flatten.compact if url = ENV["DATABASE_URL"] build_url_config(url, build_db_config) |