#1250 修改资料保存后提示信息显示问题

解决方案:flash显示一次后自动清空
This commit is contained in:
sw 2014-10-09 17:49:16 +08:00
parent 8b7a775419
commit 7f08652cd1
1 changed files with 3 additions and 3 deletions

View File

@ -130,7 +130,7 @@ class MyController < ApplicationController
@user.pref.save
@user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : [])
set_language_if_valid @user.language
flash[:notice] = l(:notice_account_updated)
flash.now[:notice] = l(:notice_account_updated)
redirect_to user_path(@user)
return
else
@ -160,7 +160,7 @@ class MyController < ApplicationController
@user.destroy
if @user.destroyed?
logout_user
flash[:notice] = l(:notice_account_deleted)
flash.now[:notice] = l(:notice_account_deleted)
end
redirect_to home_path
end
@ -170,7 +170,7 @@ class MyController < ApplicationController
def password
@user = User.current
unless @user.change_password_allowed?
flash[:error] = l(:notice_can_t_change_password)
flash.now[:error] = l(:notice_can_t_change_password)
redirect_to my_account_path
return
end