diff options
author | Glenn Gillen <me@glenngillen.com> | 2011-07-25 10:21:56 +0100 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-07-25 09:08:08 -0700 |
commit | 4605b5639db4fa15f8b6627245c74b899241f38a (patch) | |
tree | 8a569d5adeb39021bca4f427c7f3d3f001b43c9b /activerecord/lib/active_record | |
parent | 36fd3fdf46f6733b9a626401eaeaca1f5dfbd083 (diff) | |
download | rails-4605b5639db4fa15f8b6627245c74b899241f38a.tar.gz rails-4605b5639db4fa15f8b6627245c74b899241f38a.tar.bz2 rails-4605b5639db4fa15f8b6627245c74b899241f38a.zip |
Simplify the way default DATABASE_URL works.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb index 123b3654e6..7312e34f01 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb @@ -54,7 +54,7 @@ module ActiveRecord # # The exceptions AdapterNotSpecified, AdapterNotFound and ArgumentError # may be returned on an error. - def self.establish_connection(spec = nil) + def self.establish_connection(spec = ENV["DATABASE_URL"]) case spec when nil raise AdapterNotSpecified unless defined?(Rails.env) |