diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2013-12-24 10:02:07 +0100 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2013-12-24 10:02:07 +0100 |
commit | d2ed433b0af948da78e971bf342c506b27f6072f (patch) | |
tree | 56c97a391d79ff47ff0b03782f84cd7b9ebf5e1a /activerecord/lib/active_record/connection_handling.rb | |
parent | d8336cab32d0d8e8c2877cac26111cbecb5ac872 (diff) | |
download | rails-d2ed433b0af948da78e971bf342c506b27f6072f.tar.gz rails-d2ed433b0af948da78e971bf342c506b27f6072f.tar.bz2 rails-d2ed433b0af948da78e971bf342c506b27f6072f.zip |
Only build a ConnectionSpecification if required
Diffstat (limited to 'activerecord/lib/active_record/connection_handling.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_handling.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb index 6035e674ce..f274f74619 100644 --- a/activerecord/lib/active_record/connection_handling.rb +++ b/activerecord/lib/active_record/connection_handling.rb @@ -36,7 +36,7 @@ module ActiveRecord # may be returned on an error. def establish_connection(spec = ENV["DATABASE_URL"]) resolver = ConnectionAdapters::ConnectionSpecification::Resolver.new configurations - spec = resolver.resolve(spec) + spec = resolver.spec(spec) unless respond_to?(spec.adapter_method) raise AdapterNotFound, "database configuration specifies nonexistent #{spec.config[:adapter]} adapter" |