instance method
disconnect!
Ruby on Rails 8.0.4
Since v3.1.12Signature
disconnect!()
Disconnects from the database if already connected. Otherwise, this method does nothing.
Source
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 123
def disconnect!
@lock.synchronize do
super
@raw_connection&.close
@raw_connection = nil
end
end
Defined in activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb line 123
· View on GitHub
· Improve this page
· Find usages on GitHub