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

competition
sw 11 years ago
parent bbb38d381d
commit 4998420410

@ -140,11 +140,11 @@ class MyController < ApplicationController
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
if @user.save
flash[:notice] = l(:notice_account_password_updated)
flash.now[:notice] = l(:notice_account_password_updated)
redirect_to my_account_path
end
else
flash[:error] = l(:notice_account_wrong_password)
flash.now[:error] = l(:notice_account_wrong_password)
end
end
end

Loading…
Cancel
Save