Fix up previous commit and update CHANGELOG.
This commit is contained in:
parent
5570929b56
commit
5909d6a0c5
|
@ -1,3 +1,11 @@
|
|||
== 1.5.2 (dev)
|
||||
|
||||
* enhancements
|
||||
* Add support for rails 3.1 new mass assignment conventions (by github.com/kirs)
|
||||
|
||||
* bug fix
|
||||
* OmniAuth error message now shows the proper option (:strategy_class instead of :klass)
|
||||
|
||||
== 1.5.1
|
||||
|
||||
* bug fix
|
||||
|
|
|
@ -52,7 +52,6 @@ module Devise
|
|||
# error on :current_password. It also automatically rejects :password and
|
||||
# :password_confirmation if they are blank.
|
||||
def update_with_password(params, *options)
|
||||
as = options.first[:as] rescue nil
|
||||
current_password = params.delete(:current_password)
|
||||
|
||||
if params[:password].blank?
|
||||
|
@ -61,7 +60,7 @@ module Devise
|
|||
end
|
||||
|
||||
result = if valid_password?(current_password)
|
||||
update_attributes(params, :as => as)
|
||||
update_attributes(params, *options)
|
||||
else
|
||||
self.attributes = params
|
||||
self.valid?
|
||||
|
@ -86,12 +85,10 @@ module Devise
|
|||
# end
|
||||
#
|
||||
def update_without_password(params, *options)
|
||||
as = options.first[:as] rescue nil
|
||||
|
||||
params.delete(:password)
|
||||
params.delete(:password_confirmation)
|
||||
|
||||
result = update_attributes(params, :as => as)
|
||||
result = update_attributes(params, *options)
|
||||
clean_up_passwords
|
||||
result
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue