method
retrieve_connection
Ruby on Rails latest stable (v7.1.3.2)
-
0 notes -
Class: ActiveRecord::ConnectionAdapters::ConnectionHandler
retrieve_connection(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)
public
Locate the connection of the nearest super class. This can be an active or defined connection: if it is the latter, it will be opened and set as the active connection for the class it was defined for (not necessarily the current class).