From b188e523b307fd344afdf9ab14eaeaab163186b8 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Tue, 7 Dec 2021 09:17:03 +0000 Subject: [PATCH] Only show success message when the password is updated (#151) --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 9ebdae068..a65b1f137 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -8,7 +8,7 @@ class UsersController < ApplicationController def update if @user.update(user_params) bypass_sign_in @user - flash[:notice] = I18n.t("devise.passwords.updated") + flash[:notice] = I18n.t("devise.passwords.updated") if user_params.key?("password") redirect_to user_path(@user) end end