Browse Source

Only show success message when the password is updated

pull/151/head
Kat 4 years ago
parent
commit
1883278787
  1. 2
      app/controllers/users_controller.rb

2
app/controllers/users_controller.rb

@ -8,7 +8,7 @@ class UsersController < ApplicationController
def update def update
if @user.update(user_params) if @user.update(user_params)
bypass_sign_in @user 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) redirect_to user_path(@user)
end end
end end

Loading…
Cancel
Save