aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_handling.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2014-04-09 00:55:49 +0930
committerMatthew Draper <matthew@trebex.net>2014-04-09 00:58:44 +0930
commit88cd65b174d9a75d9cb0e5e06a57615ccc80fff1 (patch)
tree8ebf8a6bfb0f04d07c528a42ccbfe6f7acd8a431 /activerecord/lib/active_record/connection_handling.rb
parent615e0dcdf1391a8b71ad6556c2e7b9cedf6ffa12 (diff)
downloadrails-88cd65b174d9a75d9cb0e5e06a57615ccc80fff1.tar.gz
rails-88cd65b174d9a75d9cb0e5e06a57615ccc80fff1.tar.bz2
rails-88cd65b174d9a75d9cb0e5e06a57615ccc80fff1.zip
Don't deprecate after all
Diffstat (limited to 'activerecord/lib/active_record/connection_handling.rb')
-rw-r--r--activerecord/lib/active_record/connection_handling.rb18
1 files changed, 2 insertions, 16 deletions
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