Skip to content

Instantly share code, notes, and snippets.

@stevencwarren
Last active December 14, 2015 08:28
Show Gist options
  • Save stevencwarren/5057769 to your computer and use it in GitHub Desktop.
Save stevencwarren/5057769 to your computer and use it in GitHub Desktop.
class Api::ProjectsController < Api::ApiController
respond_to :json, :xml
def create
@project = Project.new params[:project]
if @project.save
return @project
else
return [ @project,:status => :unprocessable_entity ]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment