Module: Authlogic::ActsAsAuthentic::SessionMaintenance::Methods
- Defined in:
- lib/authlogic/acts_as_authentic/session_maintenance.rb
Overview
This module, as one of the ‘acts_as_authentic_modules`, is only included into an ActiveRecord model if that model calls `acts_as_authentic`.
Class Method Summary collapse
Instance Method Summary collapse
-
#save_without_session_maintenance(*args) ⇒ Object
Save the record and skip session maintenance all together.
Class Method Details
.included(klass) ⇒ Object
86 87 88 89 90 91 |
# File 'lib/authlogic/acts_as_authentic/session_maintenance.rb', line 86 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.
94 95 96 97 98 99 |
# File 'lib/authlogic/acts_as_authentic/session_maintenance.rb', line 94 def save_without_session_maintenance(*args) self.skip_session_maintenance = true result = save(*args) self.skip_session_maintenance = false result end |