method

lease_connection

rails latest stable - Class: ActiveRecord::ConnectionAdapters::ConnectionPool

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

lease_connection()
public

Retrieve the connection associated with the current thread, or call #checkout to obtain one if necessary.

#lease_connection can be called any number of times; the connection is held in a cache keyed by a thread.