From 0eee37b6021cbffa4198cd4cf133779dc502264b Mon Sep 17 00:00:00 2001 From: Michael Hartl Date: Thu, 2 Mar 2017 16:56:07 -0800 Subject: [PATCH] Switch to using error message for blank --- app/controllers/password_resets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/password_resets_controller.rb b/app/controllers/password_resets_controller.rb index 64d12e7..d218ae4 100644 --- a/app/controllers/password_resets_controller.rb +++ b/app/controllers/password_resets_controller.rb @@ -24,7 +24,7 @@ def edit def update if params[:user][:password].empty? # Case (3) - @user.errors.add(:password, "can't be empty") + @user.errors.add(:password, :blank) render 'edit' elsif @user.update_attributes(user_params) # Case (4) log_in @user