Method: ActiveRecord::ConnectionAdapters::Mysql2Adapter#disconnect!
- Defined in:
- activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
#disconnect! ⇒ Object
Disconnects from the database if already connected. Otherwise, this method does nothing.
123 124 125 126 127 128 129 |
# 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 |