Permalink
Browse files

removing useless ternary

  • Loading branch information...
1 parent a70248c commit a4458f5d21da65c4291aa339ac91c332867752f7 @tenderlove tenderlove committed Aug 19, 2010
@@ -322,7 +322,7 @@ def retrieve_connection(klass) #:nodoc:
# already been opened.
def connected?(klass)
conn = retrieve_connection_pool(klass)
- conn ? conn.connected? : false
+ conn && conn.connected?
end
# Remove the connection for this class. This will close the active
@@ -89,7 +89,7 @@ def test_not_connected_defined_connection_returns_false
def test_undefined_connection_returns_false
old_handler = ActiveRecord::Base.connection_handler
ActiveRecord::Base.connection_handler = ActiveRecord::ConnectionAdapters::ConnectionHandler.new
- assert_equal false, ActiveRecord::Base.connected?
+ assert ! ActiveRecord::Base.connected?
ensure
ActiveRecord::Base.connection_handler = old_handler
end

0 comments on commit a4458f5

Please sign in to comment.