Created
March 4, 2018 02:05
-
-
Save gusrub/19c58a2951ce5e12cfeb4cdce4db7a31 to your computer and use it in GitHub Desktop.
MVC services demo 1
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 | |
if @user.save | |
render json: @user, status: 200 | |
else | |
render json @user.errors, status: 400 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment