Fix up previous commit and update CHANGELOG.

This commit is contained in:
José Valim 2011-11-24 09:24:06 +00:00
parent 5570929b56
commit 5909d6a0c5
2 changed files with 12 additions and 7 deletions

View File

@ -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

View File

@ -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,16 +85,14 @@ 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
def after_database_authentication
end
@ -110,7 +107,7 @@ module Devise
def downcase_keys
(self.class.case_insensitive_keys || []).each { |k| self[k].try(:downcase!) }
end
def strip_whitespace
(self.class.strip_whitespace_keys || []).each { |k| self[k].try(:strip!) }
end