提交 c1b4b3b5 编写于 作者: X Xavier Noria

Merge pull request #9358 from iwiznia/patch-1

Update railties/lib/rails/application/configuration.rb
......@@ -97,9 +97,9 @@ def threadsafe!
self
end
# Loads and returns the contents of the #database_configuration_file. 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}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册