Skip to content

Instantly share code, notes, and snippets.

@hchood
Created March 15, 2016 12:23
Show Gist options
  • Save hchood/47814f8f255d2bd21920 to your computer and use it in GitHub Desktop.
Save hchood/47814f8f255d2bd21920 to your computer and use it in GitHub Desktop.
# app/controllers/v1/users_controller.rb
def create
user = SignUpUser.perform(user_params)
if user.save
render json: user, serializer: AuthenticationSerializer, root: :user
else
render json: { errors: user.errors.full_messages },
status: :unprocessable_entity
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment