Permalink
Browse files

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

Better comment for database_configuration method
  • Loading branch information...
1 parent d0dfe16 commit 7b6f2a0f24e7b58aa7e6dd5dfc4ee66320f2395f @iwiznia iwiznia committed Feb 21, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/lib/rails/application/configuration.rb
@@ -97,9 +97,9 @@ def threadsafe!
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}

0 comments on commit 7b6f2a0

Please sign in to comment.