Class: Jobshop::RegistrationsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Jobshop::RegistrationsController
- Defined in:
- app/controllers/jobshop/registrations_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
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 sign_in_and_redirect(@registration.user) else render(:new) end end |
#new ⇒ Object
5 6 7 8 |
# File 'app/controllers/jobshop/registrations_controller.rb', line 5 def new @registration = ::Jobshop::Registration.new(params) render json: @registration end |