enviar a lxs invitadxs a la raiz del sitio
This commit is contained in:
parent
71321c50f0
commit
363a80b085
2 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,7 @@ class LoginController < ApplicationController
|
|||
def new
|
||||
@has_cover = true
|
||||
@site = Site.find(params[:site_id]) if params[:site_id].present?
|
||||
|
||||
render 'login/new'
|
||||
end
|
||||
|
||||
|
@ -15,6 +16,7 @@ class LoginController < ApplicationController
|
|||
authenticate
|
||||
session[:lang] = params[:lang]
|
||||
referer = request.referer unless /\/login/ =~ request.referer
|
||||
referer = params[:referer] if params[:referer].present?
|
||||
|
||||
if authenticated?
|
||||
redirect_to referer || sites_path
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
= render 'layouts/flash'
|
||||
|
||||
= form_tag login_path do
|
||||
- if @site
|
||||
%input{type: 'hidden', name: 'referer', value: site_path(@site)}
|
||||
.form-group
|
||||
%input{type: 'email', name: 'username', class: 'form-control', placeholder: t('login.email')}
|
||||
.form-group
|
||||
|
|
Loading…
Reference in a new issue