module Authlogic::ActsAsAuthentic::SessionMaintenance::Config

Public Instance Methods

maintain_sessions(value = nil) click to toggle source

This is more of a convenience method. In order to turn off automatic maintenance of sessions just set this to false, or you can also set the #session_ids method to a blank array. Both accomplish the same thing. This method is a little clearer in it's intentions though.

  • Default: true

  • Accepts: Boolean

# File lib/authlogic/acts_as_authentic/session_maintenance.rb, line 35
def maintain_sessions(value = nil)
  rw_config(:maintain_sessions, value, true)
end
Also aliased as: maintain_sessions=
maintain_sessions=(value = nil)
Alias for: maintain_sessions
session_class(value = nil) click to toggle source

The name of the associated session class. This is inferred by the name of the model.

  • Default: “#{klass.name}Session”.constantize

  • Accepts: Class

# File lib/authlogic/acts_as_authentic/session_maintenance.rb, line 55
def session_class(value = nil)
  const = "#{base_class.name}Session".constantize rescue nil
  rw_config(:session_class, value, const)
end
Also aliased as: session_class=
session_class=(value = nil)
Alias for: session_class
session_ids(value = nil) click to toggle source

As you may know, authlogic sessions can be separate by id (See Authlogic::Session::Id#id). You can specify here what session ids you want auto maintained. By default it is the main session, which has an id of nil.

  • Default: [nil]

  • Accepts: Array

# File lib/authlogic/acts_as_authentic/session_maintenance.rb, line 46
def session_ids(value = nil)
  rw_config(:session_ids, value, [nil])
end
Also aliased as: session_ids=
session_ids=(value = nil)
Alias for: session_ids