Module: Devision::Models::Tokenizable::ClassMethods

Defined in:
lib/devision/models/tokenizable.rb

Instance Method Summary collapse

Instance Method Details

#locate_record_by_token(original_raw_token) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/devision/models/tokenizable.rb', line 32

def locate_record_by_token(original_raw_token)
  original_token     = original_raw_token
  saved_token = Devision.token_generator.digest(self, :token, original_token)

  tokenizable = find_or_initialize_with_error_by(:token, saved_token)
  tokenizable
end