Module: Authlogic::Session::MagicColumns::Config

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

Overview

Configuration for the magic columns feature.

Instance Method Summary collapse

Instance Method Details

#last_request_at_threshold(value = nil) ⇒ Object Also known as: last_request_at_threshold=

Every time a session is found the last_request_at field for that record is updated with the current time, if that field exists. If you want to limit how frequent that field is updated specify the threshold here. For example, if your user is making a request every 5 seconds, and you feel this is too frequent, and feel a minute is a good threshold. Set this to 1.minute. Once a minute has passed in between requests the field will be updated.

  • Default: 0

  • Accepts: integer representing time in seconds



40
41
42
# File 'lib/authlogic/session/magic_columns.rb', line 40

def last_request_at_threshold(value = nil)
  rw_config(:last_request_at_threshold, value, 0)
end