instance method
reset!
Ruby on Rails 8.1.2
Since v2.2.3Signature
reset!()
Reset the state of this connection, directing the DBMS to clear transactions and other connection-related server-side state. Usually a database-dependent operation.
If a database driver or protocol does not support such a feature, implementors may alias this to #reconnect!. Otherwise, implementors should call super immediately after resetting the connection (and while still holding @lock).
Source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 780
def reset!
attempt_configure_connection do
clear_cache!(new_connection: true)
reset_transaction
configure_connection
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_adapter.rb line 780
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractAdapter