Module: Authlogic::ActsAsAuthentic::PerishableToken::Methods::InstanceMethods
- Defined in:
- lib/authlogic/acts_as_authentic/perishable_token.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#disable_perishable_token_maintenance? ⇒ Boolean
A convenience method based on the disable_perishable_token_maintenance configuration option.
-
#reset_perishable_token ⇒ Object
Resets the perishable token to a random friendly token.
-
#reset_perishable_token! ⇒ Object
Same as reset_perishable_token, but then saves the record afterwards.
Instance Method Details
#disable_perishable_token_maintenance? ⇒ Boolean
A convenience method based on the disable_perishable_token_maintenance configuration option.
115 116 117 |
# File 'lib/authlogic/acts_as_authentic/perishable_token.rb', line 115 def disable_perishable_token_maintenance? self.class.disable_perishable_token_maintenance == true end |
#reset_perishable_token ⇒ Object
Resets the perishable token to a random friendly token.
103 104 105 |
# File 'lib/authlogic/acts_as_authentic/perishable_token.rb', line 103 def reset_perishable_token self.perishable_token = Random.friendly_token end |
#reset_perishable_token! ⇒ Object
Same as reset_perishable_token, but then saves the record afterwards.
108 109 110 111 |
# File 'lib/authlogic/acts_as_authentic/perishable_token.rb', line 108 def reset_perishable_token! reset_perishable_token save_without_session_maintenance(validate: false) end |