aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2018-02-22 15:39:11 -0500
committereileencodes <eileencodes@gmail.com>2018-02-22 15:39:11 -0500
commitedb61ca8dcb348563c227f2cfc8d8576216aa9f3 (patch)
treeca5b3f006541ae47965124fde0534b36ca606ef5 /railties/lib/rails/application
parentf85c77bef9efd8ffa97a59e87320e55e486e30c2 (diff)
downloadrails-edb61ca8dcb348563c227f2cfc8d8576216aa9f3.tar.gz
rails-edb61ca8dcb348563c227f2cfc8d8576216aa9f3.tar.bz2
rails-edb61ca8dcb348563c227f2cfc8d8576216aa9f3.zip
Revert "Reject empty database yamls"
This reverts commit 0979713abe2e22083e1beca01a1d113408c9ab36. I originally wanted to delete the default config but found out it can be called anything which means the code would blow up in unexpected ways. I thought "cool ill just delete the configs without dbs" and realized that totally 100% breaks the three-tier config. So I'm reverting this and the other commit.
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r--railties/lib/rails/application/configuration.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb
index 1bdaf91c46..8af364f1e4 100644
--- a/railties/lib/rails/application/configuration.rb
+++ b/railties/lib/rails/application/configuration.rb
@@ -179,7 +179,7 @@ module Rails
values.reverse_merge!(shared)
end
end
- loaded_yaml.reject! { |_, values| !values["database"] }
+ loaded_yaml.delete("default")
Hash.new(shared).merge(loaded_yaml)
elsif ENV["DATABASE_URL"]
# Value from ENV['DATABASE_URL'] is set to default database connection