From 88cd65b174d9a75d9cb0e5e06a57615ccc80fff1 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Wed, 9 Apr 2014 00:55:49 +0930 Subject: Don't deprecate after all --- activerecord/lib/active_record/connection_handling.rb | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb index 3667a42864..31e7390bf7 100644 --- a/activerecord/lib/active_record/connection_handling.rb +++ b/activerecord/lib/active_record/connection_handling.rb @@ -73,22 +73,8 @@ module ActiveRecord def config @raw_config.dup.tap do |cfg| if url = ENV['DATABASE_URL'] - if cfg[@env] - if cfg[@env]["url"] - # Nothing to do - else - ActiveSupport::Deprecation.warn "Overriding database configuration with DATABASE_URL without using an ERB tag in database.yml is deprecated. Please update the entry for #{@env.inspect}:\n\n" \ - " #{@env}:\n url: <%= ENV['DATABASE_URL'] %>\n\n"\ - "This will be required in Rails 4.2" - cfg[@env]["url"] = url - end - else - cfg[@env] = {} - ActiveSupport::Deprecation.warn "Supplying DATABASE_URL without a matching entry in database.yml is deprecated. Please add an entry for #{@env.inspect}:\n\n" \ - " #{@env}:\n url: <%= ENV['DATABASE_URL'] %>\n\n"\ - "This will be required in Rails 4.2" - cfg[@env]["url"] ||= url - end + cfg[@env] ||= {} + cfg[@env]["url"] ||= url end end end -- cgit v1.2.3