instance method
disconnect!
Ruby on Rails 8.0.4
Since v2.2.3Signature
disconnect!()
Disconnects from the database if already connected. Otherwise, this method does nothing.
Source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 702
def disconnect!
@lock.synchronize do
clear_cache!(new_connection: true)
reset_transaction
@raw_connection_dirty = false
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_adapter.rb line 702
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractAdapter