Module: FetcheableOnApi::Pageable
- Defined in:
- lib/fetcheable_on_api/pageable.rb
Overview
Pageable implements pagination support.
It handles the controller parameters:
-
page[:number]the requested page (default: 1). -
page[:size]number of records per page.
If no page parameter is present on the request, the full collection is returned.
The following pagination information is add to the response headers:
-
Pagination-Current-Pagethe page that is returned. -
Pagination-Perthe number of records included in the page. -
Pagination-Total-Pagesthe total number of pages available. -
Pagination-Total-Countthe total number of records available.