Skip to content

Instantly share code, notes, and snippets.

@gusrub
Created March 4, 2018 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gusrub/0262ec69739c6122af0a3368a4e1a3d8 to your computer and use it in GitHub Desktop.
Save gusrub/0262ec69739c6122af0a3368a4e1a3d8 to your computer and use it in GitHub Desktop.
class UsersController < ApplicationController
def create
service = CreateUserService.new(@user, params[:send_email])
if service.perform
render json: service.output, status: 200
else
render json service.errors, status: 400
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment