diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb index ecdfb00..3ab0b55 100644 --- a/app/controllers/login_controller.rb +++ b/app/controllers/login_controller.rb @@ -13,9 +13,10 @@ class LoginController < ApplicationController def create authenticate session[:lang] = params[:lang] + referer = request.referer unless /\/login\// =~ request.referer if authenticated? - redirect_to request.referer || sites_path + redirect_to referer || sites_path else flash[:danger] = t('login.error') render 'login/new'