Skip to content

Instantly share code, notes, and snippets.

@coderdan
Created September 4, 2012 06:55
Show Gist options
  • Save coderdan/3617808 to your computer and use it in GitHub Desktop.
Save coderdan/3617808 to your computer and use it in GitHub Desktop.
class CustomerAPI < Grape::API
version 'v1', :using => :header
resource :users do
desc "Return all users"
get do
User.all
end
desc "Return a User with a given ID"
get "/:id" do
User.find(params[:id])
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment