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



63
64
65
66
67
68
# File 'lib/authlogic/acts_as_authentic/session_maintenance.rb', line 63

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.



71
72
73
74
75
76
# File 'lib/authlogic/acts_as_authentic/session_maintenance.rb', line 71

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