mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 01:21:42 +00:00
confirmar la cuenta e ingresar al sitio
This commit is contained in:
parent
39b575ebfb
commit
bd3b2ce8c5
5 changed files with 12 additions and 2 deletions
|
@ -41,7 +41,10 @@ class InvitadxsController < ApplicationController
|
|||
|
||||
if @invitadx.confirmation_token = params[:confirmation_token]
|
||||
@invitadx.update_attribute :confirmed, true
|
||||
redirect_to site_
|
||||
flash[:info] = t('.confirmed')
|
||||
redirect_to site_invitadxs_login_new_path(@site)
|
||||
else
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -7,13 +7,14 @@ class LoginController < ApplicationController
|
|||
|
||||
def new
|
||||
@has_cover = true
|
||||
@site = Site.find(params[:site_id]) if params[:site_id].present?
|
||||
render 'login/new'
|
||||
end
|
||||
|
||||
def create
|
||||
authenticate
|
||||
session[:lang] = params[:lang]
|
||||
referer = request.referer unless /\/login\// =~ request.referer
|
||||
referer = request.referer unless /\/login/ =~ request.referer
|
||||
|
||||
if authenticated?
|
||||
redirect_to referer || sites_path
|
||||
|
|
|
@ -23,6 +23,8 @@ en:
|
|||
password: Password
|
||||
password_confirmation: Repeat password
|
||||
submit: Register
|
||||
confirmation:
|
||||
confirmed: 'Your account is confirmed, please log in to continue'
|
||||
info:
|
||||
posts:
|
||||
reorder: "The articles have been reordered!"
|
||||
|
|
|
@ -23,6 +23,8 @@ es:
|
|||
password: Contraseña
|
||||
password_confirmation: Repite la contraseña
|
||||
submit: Registrarme
|
||||
confirmation:
|
||||
confirmed: 'Tu cuenta está confirmada, ahora puedes ingresar'
|
||||
info:
|
||||
posts:
|
||||
reorder: "¡Los artículos fueron reordenados!"
|
||||
|
|
|
@ -18,6 +18,8 @@ Rails.application.routes.draw do
|
|||
resources :invitadxs, only: [:index, :new] do
|
||||
get :confirmation, to: 'invitadxs#confirmation'
|
||||
end
|
||||
get :'invitadxs/login/new', to: 'login#new'
|
||||
post :'invitadxs/login', to: 'login#create'
|
||||
|
||||
get 'i18n', to: 'i18n#index'
|
||||
get 'i18n/edit', to: 'i18n#edit'
|
||||
|
|
Loading…
Reference in a new issue