From 79b24b72dab4c7bf60ebf708603f008df826d4bd Mon Sep 17 00:00:00 2001 From: f Date: Sat, 22 Sep 2018 11:49:52 -0300 Subject: [PATCH] no redireccion a login al loguearse directamente --- app/controllers/login_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'