diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-11-06 01:29:09 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-11-06 01:29:09 +0530 |
commit | 0832bc63f4047d0ad0171c411460db23450213aa (patch) | |
tree | 550b8a8cf1bebfc000d83b40f519cbc9eb169140 /activerecord/lib | |
parent | 396d599e24cbfa15c62b20fab8cc02cdba046ce3 (diff) | |
download | rails-0832bc63f4047d0ad0171c411460db23450213aa.tar.gz rails-0832bc63f4047d0ad0171c411460db23450213aa.tar.bz2 rails-0832bc63f4047d0ad0171c411460db23450213aa.zip |
Make sure ActiveRecord::Base.connected? doesn't raise an exception for defined connections
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 3 |
1 files changed, 2 insertions, 1 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 3016c329bd..54a17e20a9 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -324,7 +324,8 @@ module ActiveRecord # Returns true if a connection that's accessible to this class has # already been opened. def connected?(klass) - conn = retrieve_connection_pool(klass) ? conn.connected? : false + conn = retrieve_connection_pool(klass) + conn ? conn.connected? : false end # Remove the connection for this class. This will close the active |