Use the correct error message to unmatched password with password_confirmation

This commit is contained in:
yoshihara 2015-04-08 16:51:58 +09:00
parent c0d90640a3
commit 27f550e9ea

View File

@ -58,7 +58,7 @@ class User
def valid_password_confirmation
unless password == password_confirmation
errors.add(:current_password, :wrong_password)
errors.add(:password, :confirmation, attribute: User.human_attribute_name(:password_confirmation))
end
end