diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2018-03-16 15:18:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-16 15:18:26 -0400 |
commit | 9700dacffe412ea47b00db62c0a0099b69b4dfca (patch) | |
tree | b267549a4fb8bce506a02d4450e5f31a8d876fdf /railties/lib/rails | |
parent | 45ddb7f1f94c2086488aaaac47a1092cf832f381 (diff) | |
parent | 4027643f7f7eed9186d158fe5b1f21d0d6de8fe1 (diff) | |
download | rails-9700dacffe412ea47b00db62c0a0099b69b4dfca.tar.gz rails-9700dacffe412ea47b00db62c0a0099b69b4dfca.tar.bz2 rails-9700dacffe412ea47b00db62c0a0099b69b4dfca.zip |
Merge pull request #32271 from eileencodes/fix-three-tier-default-connection
Fix default connection handling with three-tier config
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/commands/dbconsole/dbconsole_command.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/dbconsole/dbconsole_command.rb b/railties/lib/rails/commands/dbconsole/dbconsole_command.rb index 8df548b5de..806b7de6d6 100644 --- a/railties/lib/rails/commands/dbconsole/dbconsole_command.rb +++ b/railties/lib/rails/commands/dbconsole/dbconsole_command.rb @@ -97,7 +97,7 @@ module Rails elsif configurations[environment].blank? && configurations[connection].blank? raise ActiveRecord::AdapterNotSpecified, "'#{environment}' database is not configured. Available configuration: #{configurations.inspect}" else - configurations[environment].presence || configurations[connection] + configurations[connection] || configurations[environment].presence end end end |