修复修改密码时,错误信息在其他页面会提示的BUG

This commit is contained in:
sw 2014-08-22 16:52:47 +08:00
parent bbb38d381d
commit 4998420410
1 changed files with 2 additions and 2 deletions

View File

@ -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