mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Updating changelog and adding example doc.
This commit is contained in:
parent
6829619330
commit
e7621afba5
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
* enhancements
|
||||
|
||||
* Allow overwriting find for authentication method
|
||||
|
||||
== 0.5.4
|
||||
|
||||
* deprecations
|
||||
|
|
|
@ -73,6 +73,13 @@ module Devise
|
|||
# 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
|
||||
# find(:first, :conditions => conditions)
|
||||
# end
|
||||
#
|
||||
def find_for_authentication(conditions)
|
||||
find(:first, :conditions => conditions)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue