Created
May 10, 2015 19:27
-
-
Save SoldierCoder/9dd017aeae3b98cd0b43 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 HumansController < ApplicationController | |
def create | |
human = Human.new(human_params) | |
if human.save | |
render json: human, status: 201, location: human | |
end | |
end | |
private | |
def human_params | |
params.require(:human).permit(:name, :brain_type) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment