aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_handling.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-02-26 10:14:40 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2014-02-26 10:14:40 -0800
commitbf3ddfa28da8ca837ddce8c6744a6c1fd9a51243 (patch)
treec96839ac99bcf2142939a728b56116679bf0f909 /activerecord/lib/active_record/connection_handling.rb
parente5e440f477a0b5e06b008ee77e3c635049405957 (diff)
parent3225898513434ded93fe3abe51ba700f5bd9db84 (diff)
downloadrails-bf3ddfa28da8ca837ddce8c6744a6c1fd9a51243.tar.gz
rails-bf3ddfa28da8ca837ddce8c6744a6c1fd9a51243.tar.bz2
rails-bf3ddfa28da8ca837ddce8c6744a6c1fd9a51243.zip
Merge branch 'master' into adequaterecord
* master: (55 commits) [ci skip] Move association class method notes extract common code in `uuid_test.rb`. move PostgreSQL UUID tests from `datatype_test.rb` to `uuid_test.rb`. [ci skip] remove guide section on models in migrations test case for custom PostgreSQL enum type. Remove inclusion of rubysl gem for rbx on generated Gemfile let `insert_record` actuall save the object. [skip ci] Fix test name typo in app generator tests. travis s/2.1.0/2.1.1 Bump version of bcrypt gem Skip test_migrate_revert_add_index_with_name if databases do not allow to create duplicate indexes on the same columns Optimize getting started guide images, and use png instead of jpg :scissors: [ci skip] Point master changelogs to 4-1-stable branch Add missing parantheses in index_exists? `ActionDispatch::Head` was replaced by `Rack::Head`. Closes #14191. [skip ci] Standardized punctuation. [skip ci] Fix typo in link_to :method option description refactor, with_locale is not needed because I18n is mocked. Fix ActionView label translation for more than 10 nested elements ...
Diffstat (limited to 'activerecord/lib/active_record/connection_handling.rb')
-rw-r--r--activerecord/lib/active_record/connection_handling.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb
index 11f6a47158..4ba4e09777 100644
--- a/activerecord/lib/active_record/connection_handling.rb
+++ b/activerecord/lib/active_record/connection_handling.rb
@@ -93,16 +93,12 @@ module ActiveRecord
# the connection URL. This hash responds to any string key with
# resolved connection information.
def default_url_hash
- if @raw_config.blank?
- Hash.new do |hash, key|
- hash[key] = if key.is_a? String
- ActiveRecord::ConnectionAdapters::ConnectionSpecification::ConnectionUrlResolver.new(@url).to_hash
- else
- nil
- end
+ Hash.new do |hash, key|
+ hash[key] = if key.is_a? String
+ ActiveRecord::ConnectionAdapters::ConnectionSpecification::ConnectionUrlResolver.new(@url).to_hash
+ else
+ nil
end
- else
- {}
end
end
end