Skip to content

Instantly share code, notes, and snippets.

@aishek
Created January 17, 2015 18:23
Show Gist options
  • Save aishek/b42d07a3a7bf9ee8ac0e to your computer and use it in GitHub Desktop.
Save aishek/b42d07a3a7bf9ee8ac0e to your computer and use it in GitHub Desktop.
grape-entity statuses api example
module Api
module V1
class StatusesAPI < Api::V1::BaseAPI
get '/' do
statuses = Status.all
detailed_statuses = DetailedStatus.all
present statuses, with: Api::V1::StatusEntity, type: :full
present detailed_statuses, with: Api::V1::StatusDetailedEntity
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment