Updating changelog and adding example doc.
This commit is contained in:
parent
6829619330
commit
e7621afba5
|
@ -1,3 +1,7 @@
|
||||||
|
* enhancements
|
||||||
|
|
||||||
|
* Allow overwriting find for authentication method
|
||||||
|
|
||||||
== 0.5.4
|
== 0.5.4
|
||||||
|
|
||||||
* deprecations
|
* deprecations
|
||||||
|
@ -59,7 +63,7 @@
|
||||||
* skip_before_filter added in Devise controllers
|
* skip_before_filter added in Devise controllers
|
||||||
* Use home_or_root_path on require_no_authentication as well
|
* Use home_or_root_path on require_no_authentication as well
|
||||||
* Added devise_controller?, useful to select or reject filters in ApplicationController
|
* Added devise_controller?, useful to select or reject filters in ApplicationController
|
||||||
* Allow :path_prefix to be given to devise_for
|
* Allow :path_prefix to be given to devise_for
|
||||||
* Allow default_url_options to be configured through devise (:path_prefix => "/:locale" is now supported)
|
* Allow default_url_options to be configured through devise (:path_prefix => "/:locale" is now supported)
|
||||||
|
|
||||||
== 0.4.1
|
== 0.4.1
|
||||||
|
|
|
@ -73,6 +73,13 @@ module Devise
|
||||||
# Find first record based on conditions given (ie by the sign in form).
|
# 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
|
# Overwrite to add customized conditions, create a join, or maybe use a
|
||||||
# namedscope to filter records while authenticating.
|
# 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)
|
def find_for_authentication(conditions)
|
||||||
find(:first, :conditions => conditions)
|
find(:first, :conditions => conditions)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue