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

Defined in:


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 updatd 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 threashold. 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

# File 'lib/authlogic/session/magic_columns.rb', line 34

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