module Authlogic::ActsAsAuthentic::SessionMaintenance::Config

Configuration for the session maintenance aspect of acts_as_authentic. These methods become class methods of ::ActiveRecord::Base.

Public Instance Methods

log_in_after_create(value = nil) click to toggle source

In order to turn off automatic maintenance of sessions after create, just set this to false.

  • Default: true

  • Accepts: Boolean

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

In order to turn off automatic maintenance of sessions when updating the password, just set this to false.

  • Default: true

  • Accepts: Boolean

# File lib/authlogic/acts_as_authentic/session_maintenance.rb, line 52
def log_in_after_password_change(value = nil)
  rw_config(:log_in_after_password_change, value, true)
end
log_in_after_password_change=(value = nil)
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 74
def session_class(value = nil)
  const = begin
            "#{base_class.name}Session".constantize
          rescue NameError
            nil
          end
  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::Base#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 64
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