Allow login through link in message (and remember requested page).

This commit is contained in:
Robert Waltemath 2014-01-03 15:27:15 +01:00
parent 03f61668aa
commit 2f02f89089
3 changed files with 6 additions and 3 deletions

View file

@ -25,7 +25,8 @@ class ApplicationController < ActionController::Base
helper_method :current_user
def deny_access
redirect_to root_url, :alert => I18n.t('application.controller.error_denied')
session[:return_to] = request.original_url
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