Module: Authlogic::ActsAsAuthentic::SessionMaintenance::Methods

Defined in:
lib/authlogic/acts_as_authentic/session_maintenance.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object


76
77
78
79
80
81
# File 'lib/authlogic/acts_as_authentic/session_maintenance.rb', line 76

def self.included(klass)
  klass.class_eval do
    before_save :get_session_information, :if => :update_sessions?
    before_save :maintain_sessions, :if => :update_sessions?
  end
end

Instance Method Details

#save_without_session_maintenance(*args) ⇒ Object

Save the record and skip session maintenance all together.


84
85
86
87
88
89
# File 'lib/authlogic/acts_as_authentic/session_maintenance.rb', line 84

def save_without_session_maintenance(*args)
  self.skip_session_maintenance = true
  result = save(*args)
  self.skip_session_maintenance = false
  result
end