Skip to content

Commit

Permalink
Revert "Reject empty database yamls"
Browse files Browse the repository at this point in the history
This reverts commit 0979713.

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.
  • Loading branch information
eileencodes committed Feb 22, 2018
1 parent f85c77b commit edb61ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/lib/rails/application/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def database_configuration
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
Expand Down

0 comments on commit edb61ca

Please sign in to comment.