提交 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! ...@@ -97,9 +97,9 @@ def threadsafe!
self self
end end
# Loads and returns the contents of the #database_configuration_file. The # Loads and returns the configuration of the database.
# contents of the file are processed via ERB before being sent through # First, looks at If ENV['DATABASE_URL'] if it's not present it uses the #paths["config/database"]
# YAML::load. # The contents of the file are processed via ERB before being sent through YAML::load.
def database_configuration def database_configuration
if ENV['DATABASE_URL'] if ENV['DATABASE_URL']
{Rails.env => ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.connection_url_to_hash(ENV['DATABASE_URL']).stringify_keys} {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.
先完成此消息的编辑!
想要评论请 注册