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:
parent
0e2644cde0
commit
02ee2003a8
3 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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!
|
||||
|
|
Loading…
Reference in a new issue