mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Fix up previous commit and update CHANGELOG.
This commit is contained in:
parent
5570929b56
commit
5909d6a0c5
2 changed files with 12 additions and 7 deletions
|
@ -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
|
== 1.5.1
|
||||||
|
|
||||||
* bug fix
|
* bug fix
|
||||||
|
|
|
@ -52,7 +52,6 @@ module Devise
|
||||||
# error on :current_password. It also automatically rejects :password and
|
# error on :current_password. It also automatically rejects :password and
|
||||||
# :password_confirmation if they are blank.
|
# :password_confirmation if they are blank.
|
||||||
def update_with_password(params, *options)
|
def update_with_password(params, *options)
|
||||||
as = options.first[:as] rescue nil
|
|
||||||
current_password = params.delete(:current_password)
|
current_password = params.delete(:current_password)
|
||||||
|
|
||||||
if params[:password].blank?
|
if params[:password].blank?
|
||||||
|
@ -61,7 +60,7 @@ module Devise
|
||||||
end
|
end
|
||||||
|
|
||||||
result = if valid_password?(current_password)
|
result = if valid_password?(current_password)
|
||||||
update_attributes(params, :as => as)
|
update_attributes(params, *options)
|
||||||
else
|
else
|
||||||
self.attributes = params
|
self.attributes = params
|
||||||
self.valid?
|
self.valid?
|
||||||
|
@ -86,12 +85,10 @@ module Devise
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
def update_without_password(params, *options)
|
def update_without_password(params, *options)
|
||||||
as = options.first[:as] rescue nil
|
|
||||||
|
|
||||||
params.delete(:password)
|
params.delete(:password)
|
||||||
params.delete(:password_confirmation)
|
params.delete(:password_confirmation)
|
||||||
|
|
||||||
result = update_attributes(params, :as => as)
|
result = update_attributes(params, *options)
|
||||||
clean_up_passwords
|
clean_up_passwords
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue