Module: Devise::Models::TokenAuthenticatable::ClassMethods

Defined in:
lib/devise/models/token_authenticatable.rb

Instance Method Summary collapse

Instance Method Details

#authentication_tokenObject

Generate a token checking if one does not already exist in the database.



52
53
54
# File 'lib/devise/models/token_authenticatable.rb', line 52

def authentication_token
  generate_token(:authentication_token)
end

#find_for_token_authentication(conditions) ⇒ Object



47
48
49
# File 'lib/devise/models/token_authenticatable.rb', line 47

def find_for_token_authentication(conditions)
  find_for_authentication(:authentication_token => conditions[token_authentication_key])
end