Skip to content
railsengines.com

Garage

Rails extension for RESTful Hypermedia API

No ratings yet
Gem
garage
Repository
cookpad/garage
License
MIT
Stars
512
Added
August 22, 2026

About

Rails extension for RESTful Hypermedia API

Garage provides a simple, Hypermedia friendly RESTful API to your Rails application using its native RESTful routes. Garage provides a descriptive way to serve your ActiveRecord models, as well as plain old Ruby objects as JSON-based resources.

What you get

  • :paginate - (Boolean) Enable pagination when true. Paginates with the per_page and page params
  • :per_page - (Integer) value for default number of resources per page when paginating
  • :max_per_page - (Integer) Maximum resources per page, irrespective of requested per_page
  • :hard_limit - (Integer) Limit of retrievable records when paginating. Also hides total records.
  • :distinct_by - (Symbol) Specify a property to count by for total page count
  • :to_resource_options - (Hash) Options to pass as argument to to_resource(options)

Installing it

ruby
# Gemfile
gem "garage"

Details

512 stars on GitHub · MIT licensed · maintained by cookpad. Source: https://github.com/cookpad/garage

Discussion (0)

Sign in to join the discussion.

No comments yet.