From edb61ca8dcb348563c227f2cfc8d8576216aa9f3 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Thu, 22 Feb 2018 15:39:11 -0500 Subject: 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. --- railties/lib/rails/application/configuration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/application') 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 -- cgit v1.2.3