From a8d085c1c366c0c0b934ccf3af801a6946155c64 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Wed, 16 May 2012 12:04:23 +0100 Subject: Test for user turning email alerts off. Also includes a fix not to rely on HTTP_REFERER for subsequent redirect. --- app/controllers/user_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/user_controller.rb') diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index ef013ad1e..e56c4dd33 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -588,7 +588,7 @@ class UserController < ApplicationController end @user.receive_email_alerts = params[:receive_email_alerts] @user.save! - redirect_to request.headers['HTTP_REFERER'] + redirect_to params[:came_from] end private -- cgit v1.2.3