aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorojab <ojab@ojab.ru>2016-06-21 10:48:07 +0000
committerojab <ojab@ojab.ru>2016-06-21 11:30:10 +0000
commite07bcac01e5ae50009d61420b43d4e18fda746de (patch)
treeada46ecc207808683e36d94f857214bb6fc87bc5
parent7ad8093b0eaff02bda6bb2999e8a81a481667aab (diff)
downloadrails-e07bcac01e5ae50009d61420b43d4e18fda746de.tar.gz
rails-e07bcac01e5ae50009d61420b43d4e18fda746de.tar.bz2
rails-e07bcac01e5ae50009d61420b43d4e18fda746de.zip
Remove dormant check
This check was introduced in 6edaa26 and moved through multiple refactorings. No test are broken after removal and AFAICS there is no way to trigger it.
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
index c341773be1..eb5a742f2d 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -876,9 +876,7 @@ module ActiveRecord
def retrieve_connection(spec_name) #:nodoc:
pool = retrieve_connection_pool(spec_name)
raise ConnectionNotEstablished, "No connection pool with id '#{spec_name}' found." unless pool
- conn = pool.connection
- raise ConnectionNotEstablished, "No connection for '#{spec_name}' in connection pool" unless conn
- conn
+ pool.connection
end
# Returns true if a connection that's accessible to this class has