Method: ActiveRecord::ConnectionAdapters::AbstractAdapter#active?

Defined in:
lib/active_record/connection_adapters/abstract_adapter.rb

#active?Boolean

Checks whether the connection to the database is still active. This includes checking whether the database is actually capable of responding, i.e. whether the connection isn’t stale.

Returns:

  • (Boolean)


117
118
119
# File 'lib/active_record/connection_adapters/abstract_adapter.rb', line 117

def active?
  @active != false
end