Merge pull request #243 from foodcoop-rostock/fix-access-denied-cycle

Redirect to home page on denied access (fixes #237).
This commit is contained in:
wvengen 2014-01-03 06:59:43 -08:00
commit 933f4fe67a
3 changed files with 5 additions and 3 deletions

View file

@ -26,7 +26,7 @@ class ApplicationController < ActionController::Base
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', sign_in: ActionController::Base.helpers.link_to(t('application.controller.error_denied_sign_in'), login_path))
end
private