Permalink
Browse files

Added docs for #disconnect! on adapters

  • Loading branch information...
1 parent 0e2644c commit 02ee2003a8040e9e8de5f3258f88dfaaade06c27 @smartinez87 smartinez87 committed Apr 22, 2011
View
2 activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -310,6 +310,8 @@ def reconnect!
connect
end
+ # Disconnects from the database if already connected. Otherwise, this
+ # method does nothing.
def disconnect!
@connection.close rescue nil
end
View
3 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -276,7 +276,8 @@ def reset!
super
end
- # Close the connection.
+ # Disconnects from the database if already connected. Otherwise, this
+ # method does nothing.
def disconnect!
clear_cache!
@connection.close rescue nil
View
2 activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -90,6 +90,8 @@ def supports_add_column?
sqlite_version >= '3.1.6'
end
+ # Disconnects from the database if already connected. Otherwise, this
+ # method does nothing.
def disconnect!
super
clear_cache!

0 comments on commit 02ee200

Please sign in to comment.