Created
March 4, 2018 03:50
-
-
Save gusrub/0262ec69739c6122af0a3368a4e1a3d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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