Class: RailsJwtAuth::RegistrationsController

Inherits:
ApplicationController
  • Object
show all
Includes:
RenderHelper
Defined in:
app/controllers/rails_jwt_auth/registrations_controller.rb

Instance Method Summary collapse

Methods included from RenderHelper

#render_201, #render_204, #render_422

Instance Method Details

#createObject



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

def create
  user = RailsJwtAuth.model.new(create_params)

  user.save ? render_201(user) : render_422(user.errors)
end