5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-21 21:36:22 +00:00

no redireccion a login al loguearse directamente

This commit is contained in:
f 2018-09-22 11:49:52 -03:00
parent 81564985c5
commit 79b24b72da
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -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'