1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Update railties/lib/rails/application/configuration.rb

Better comment for database_configuration method
This commit is contained in:
iwiznia 2013-02-21 16:41:26 +01:00
parent d0dfe16ccc
commit 7b6f2a0f24

View file

@ -97,9 +97,9 @@ module Rails
self
end
# Loads and returns the contents of the #paths["config/database"]. The
# contents of the file are processed via ERB before being sent through
# YAML::load.
# Loads and returns the configuration of the database.
# First, looks at If ENV['DATABASE_URL'] if it's not present it uses the #paths["config/database"]
# The contents of the file are processed via ERB before being sent through YAML::load.
def database_configuration
if ENV['DATABASE_URL']
{Rails.env => ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.connection_url_to_hash(ENV['DATABASE_URL']).stringify_keys}