require_dependency "jobshop/application_controller" module Jobshop class Teams::RegistrationsController < ApplicationController before_action RegistrationTokenValidation skip_before_action :authenticate_user! layout "jobshop/unauthenticated" def new @registration = ::Jobshop::Registration.new(params) end def create @registration = ::Jobshop::Registration.new(params) if @registration.save store_location_for(:user, team_setup_path) sign_in_and_redirect(@registration.user) else render(:new) end end end end