Class: Jobshop::RegistrationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/jobshop/registrations_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_organization

Instance Method Details

#createObject



10
11
12
13
14
15
16
17
18
# File 'app/controllers/jobshop/registrations_controller.rb', line 10

def create
  @registration = ::Jobshop::Registration.new(params)

  if @registration.save
    (@registration.user)
  else
    render(:new)
  end
end

#newObject



5
6
7
8
# File 'app/controllers/jobshop/registrations_controller.rb', line 5

def new
  @registration = ::Jobshop::Registration.new(params)
  render json: @registration
end