instance method
disconnect!
Ruby on Rails 7.2.3
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/postgresql_adapter.rb, line 382
def disconnect!
@lock.synchronize do
super
@raw_connection&.close rescue nil
@raw_connection = nil
end
end
Defined in activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb line 382
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQLAdapter