From 27f550e9eac62e5fa5598eb723aa7a269156d556 Mon Sep 17 00:00:00 2001 From: yoshihara Date: Wed, 8 Apr 2015 16:51:58 +0900 Subject: [PATCH] Use the correct error message to unmatched password with password_confirmation --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index ae410bd..de634fd 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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