1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added docs for #disconnect! on adapters

This commit is contained in:
Sebastian Martinez 2011-04-22 12:59:05 -03:00
parent 0e2644cde0
commit 02ee2003a8
3 changed files with 6 additions and 1 deletions

View file

@ -310,6 +310,8 @@ module ActiveRecord
connect
end
# Disconnects from the database if already connected. Otherwise, this
# method does nothing.
def disconnect!
@connection.close rescue nil
end

View file

@ -276,7 +276,8 @@ module ActiveRecord
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 file

@ -90,6 +90,8 @@ module ActiveRecord
sqlite_version >= '3.1.6'
end
# Disconnects from the database if already connected. Otherwise, this
# method does nothing.
def disconnect!
super
clear_cache!