method

connected?

rails latest stable - Class: ActiveRecord::ConnectionAdapters::ConnectionHandler
connected?(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)
public

Returns true if a connection that’s accessible to this class has already been opened.