redirigir al referer

This commit is contained in:
f 2018-08-23 15:20:34 -03:00
parent d5bb40533c
commit 6918ef4eeb
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -15,8 +15,7 @@ class LoginController < ApplicationController
session[:lang] = params[:lang]
if authenticated?
# TODO enviar a la URL de donde vinimos
redirect_to sites_path
redirect_to request.referer || sites_path
else
flash[:danger] = t('login.error')
render 'login/new'