Module: Authlogic::Session::Timeout::InstanceMethods

Defined in:
lib/authlogic/session/timeout.rb

Overview

Instance methods for the timeout feature.

Instance Method Summary collapse

Instance Method Details

#stale?Boolean

Tells you if the record is stale or not. Meaning the record has timed out. This will only return true if you set logout_on_timeout to true in your configuration. Basically how a bank website works. If you aren’t active over a certain period of time your session becomes stale and requires you to log back in.

Returns:

  • (Boolean)


60
61
62
# File 'lib/authlogic/session/timeout.rb', line 60

def stale?
  !stale_record.nil? || (logout_on_timeout? && record && record.logged_out?)
end