修复修改密码时,错误信息在其他页面会提示的BUG
This commit is contained in:
parent
bbb38d381d
commit
4998420410
|
@ -140,11 +140,11 @@ class MyController < ApplicationController
|
||||||
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
|
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
|
||||||
|
|
||||||
if @user.save
|
if @user.save
|
||||||
flash[:notice] = l(:notice_account_password_updated)
|
flash.now[:notice] = l(:notice_account_password_updated)
|
||||||
redirect_to my_account_path
|
redirect_to my_account_path
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
flash[:error] = l(:notice_account_wrong_password)
|
flash.now[:error] = l(:notice_account_wrong_password)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue