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

解决方案:flash显示一次后自动清空
course_group
sw 11 years ago
parent 8b7a775419
commit 7f08652cd1

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

Loading…
Cancel
Save