method
lease_connection
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::ConnectionHandling
lease_connection()public
Returns the connection currently associated with the class. This can also be used to “borrow” the connection to do database work unrelated to any of the specific Active Records. The connection will remain leased for the entire duration of the request or job, or until #release_connection is called.