instance method
remove_connection
Ruby on Rails 8.0.4
Since v4.0.13Signature
remove_connection()
No documentation comment.
Source
# File activerecord/lib/active_record/connection_handling.rb, line 357
def remove_connection
name = @connection_specification_name if defined?(@connection_specification_name)
# if removing a connection that has a pool, we reset the
# connection_specification_name so it will use the parent
# pool.
if connection_handler.retrieve_connection_pool(name, role: current_role, shard: current_shard)
self.connection_specification_name = nil
end
connection_handler.remove_connection_pool(name, role: current_role, shard: current_shard)
end
Defined in activerecord/lib/active_record/connection_handling.rb line 357
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionHandling