Sha256: a55145be38d3c7d0193203e09f5e210f5c7326d6d040408419c1b619d6633da8

Contents?: true

Size: 602 Bytes

Versions: 2

Compression:

Stored size: 602 Bytes

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jobshop-0.0.41 app/controllers/jobshop/teams/registrations_controller.rb
jobshop-0.0.37 app/controllers/jobshop/teams/registrations_controller.rb