Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created February 27, 2014 20:03
Show Gist options
  • Save abuiles/9258335 to your computer and use it in GitHub Desktop.
Save abuiles/9258335 to your computer and use it in GitHub Desktop.
def create
@foo = Foo.new(foo_params)
if @foo.save
respond_with @foo, status: :created, location: @foo
else
render json: @foo.errors, status: :unprocessable_entity
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment