Module: Devise::Models::ApiTokenAuthenticatable::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#find_for_api_token_authentication(conditions) ⇒ Object



7
8
9
# File 'lib/devise/models/api_token_authenticatable.rb', line 7

def find_for_api_token_authentication(conditions)
  where(:login => conditions[:login]).joins(:tokens).where(Token.arel_table[:token].eq(conditions[:token])).first
end