提交 4605b563 编写于 作者: G Glenn Gillen 提交者: Aaron Patterson

Simplify the way default DATABASE_URL works.

上级 36fd3fdf
...@@ -54,7 +54,7 @@ def connection ...@@ -54,7 +54,7 @@ def connection
# #
# The exceptions AdapterNotSpecified, AdapterNotFound and ArgumentError # The exceptions AdapterNotSpecified, AdapterNotFound and ArgumentError
# may be returned on an error. # may be returned on an error.
def self.establish_connection(spec = nil) def self.establish_connection(spec = ENV["DATABASE_URL"])
case spec case spec
when nil when nil
raise AdapterNotSpecified unless defined?(Rails.env) raise AdapterNotSpecified unless defined?(Rails.env)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册