Created
March 15, 2016 12:23
-
-
Save hchood/47814f8f255d2bd21920 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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