From 03f61668aa8017966c5a9e725d98d61a62c0be82 Mon Sep 17 00:00:00 2001 From: Robert Waltemath Date: Fri, 3 Jan 2014 13:51:00 +0100 Subject: [PATCH] Redirect to home page on denied access (fixes #237). --- app/controllers/application_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index dcc0f298..205d9b60 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -25,8 +25,7 @@ class ApplicationController < ActionController::Base helper_method :current_user def deny_access - session[:return_to] = request.original_url - redirect_to login_url, :alert => I18n.t('application.controller.error_denied') + redirect_to root_url, :alert => I18n.t('application.controller.error_denied') end private