1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Run validations even when password change will fail, to show a complete list of errors

This commit is contained in:
Chase DuBois 2011-06-21 17:23:07 -04:00
parent 4bcd1c6fcd
commit a8d88d193e

View file

@ -59,8 +59,9 @@ module Devise
result = if valid_password?(current_password)
update_attributes(params)
else
self.errors.add(:current_password, current_password.blank? ? :blank : :invalid)
self.attributes = params
self.valid?
self.errors.add(:current_password, current_password.blank? ? :blank : :invalid)
false
end