# File lib/devise/models/authenticatable.rb, line 118 def find_first_by_auth_conditions(conditions) to_adapter.find_first devise_param_filter.filter(conditions) end
Find first record based on conditions given (ie by the sign in form). Overwrite to add customized conditions, create a join, or maybe use a namedscope to filter records while authenticating. Example:
def self.find_for_authentication(conditions={})
conditions[:active] = true
super
end
# File lib/devise/models/authenticatable.rb, line 114 def find_for_authentication(conditions) find_first_by_auth_conditions(conditions) end
# File lib/devise/models/authenticatable.rb, line 99 def http_authenticatable?(strategy) http_authenticatable.is_a?(Array) ? http_authenticatable.include?(strategy) : http_authenticatable end
# File lib/devise/models/authenticatable.rb, line 94 def params_authenticatable?(strategy) params_authenticatable.is_a?(Array) ? params_authenticatable.include?(strategy) : params_authenticatable end
Generated with the Darkfish Rdoc Generator 2.