5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 07:21:43 +00:00

enviar a lxs invitadxs a la raiz del sitio

This commit is contained in:
f 2019-02-11 16:40:12 -03:00
parent 71321c50f0
commit 363a80b085
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
2 changed files with 4 additions and 0 deletions

View file

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

View file

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