method

active_connection?

rails latest stable - Class: ActiveRecord::ConnectionAdapters::ConnectionPool
active_connection?()
public

Returns true if there is an open connection being used for the current thread.

This method only works for connections that have been obtained through #connection or #with_connection methods. Connections obtained through #checkout will not be detected by #active_connection?