提交 a4994484 编写于 作者: T Tim Pope 提交者: Aaron Patterson

DATABASE_URL allows omission of database.yml

上级 3b378a78
......@@ -68,7 +68,9 @@ class Railtie < Rails::Railtie
# and then establishes the connection.
initializer "active_record.initialize_database" do |app|
ActiveSupport.on_load(:active_record) do
self.configurations = app.config.database_configuration
unless ENV['DATABASE_URL']
self.configurations = app.config.database_configuration
end
establish_connection
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册