From 7774237a11f1f6b78e0b75a3c1d6a499f9feef45 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 7 May 2010 10:01:24 +0100 Subject: [PATCH] Redirect back to settings after updating user settings When we've saved a user's settings, redirect back to their settings page instead of just rerendering so that a suspended user check will be done. --- app/controllers/user_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index e5db74f38..5b9f5a0c7 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -70,9 +70,9 @@ class UserController < ApplicationController set_locale if @user.new_email.nil? or @user.new_email.empty? - flash.now[:notice] = t 'user.account.flash update success' + flash[:notice] = t 'user.account.flash update success' else - flash.now[:notice] = t 'user.account.flash update success confirm needed' + flash[:notice] = t 'user.account.flash update success confirm needed' begin Notifier.deliver_email_confirm(@user, @user.tokens.create) @@ -80,6 +80,8 @@ class UserController < ApplicationController # Ignore errors sending email end end + + redirect_to :action => "account", :display_name => @user.display_name end else if flash[:errors] -- 2.43.2