Browse Source

Only show success message when the password is updated (#151)

pull/155/head
kosiakkatrina 3 years ago committed by GitHub
parent
commit
b188e523b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/controllers/users_controller.rb

2
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

Loading…
Cancel
Save