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
|
def create
|
||||||
authenticate
|
authenticate
|
||||||
session[:lang] = params[:lang]
|
session[:lang] = params[:lang]
|
||||||
|
referer = request.referer unless /\/login\// =~ request.referer
|
||||||
|
|
||||||
if authenticated?
|
if authenticated?
|
||||||
redirect_to request.referer || sites_path
|
redirect_to referer || sites_path
|
||||||
else
|
else
|
||||||
flash[:danger] = t('login.error')
|
flash[:danger] = t('login.error')
|
||||||
render 'login/new'
|
render 'login/new'
|
||||||
|
|
Loading…
Reference in a new issue