mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 00:36:22 +00:00
no redireccion a login al loguearse directamente
This commit is contained in:
parent
81564985c5
commit
79b24b72da
1 changed files with 2 additions and 1 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue