instance method
active?
Ruby on Rails 3.0.20
Since v2.2.3Signature
active?()
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.
Source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 117
def active?
@active != false
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_adapter.rb line 117
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractAdapter