Module: Authentication::Logic::ActsAsAuthentic::PersistenceToken::Methods::InstanceMethods

Defined in:
lib/auth/logic/acts_as_authentic/persistence_token.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#reset_persistence_tokenObject

Resets the persistence_token field to a random hex value.



51
52
53
# File 'lib/auth/logic/acts_as_authentic/persistence_token.rb', line 51

def reset_persistence_token
  self.persistence_token = Authentication::Logic::Random.hex_token
end

#reset_persistence_token!Object Also known as: forget!

Same as reset_persistence_token, but then saves the record.



56
57
58
59
# File 'lib/auth/logic/acts_as_authentic/persistence_token.rb', line 56

def reset_persistence_token!
  reset_persistence_token
  save_without_session_maintenance(validate: false)
end