Closed
Description
Offer a controller-level interface for automatically adding pagination links.
Possible interface
An ActionController
instance method jsonapi_pagination(resources)
that gets automatically called at render
time with the rendered collection. The method would return a Hash
or nil
.
Example
class UsersController < ...
def jsonapi_pagination
{
first: ...,
last: ...,
...
}
end
def index
# ...
render jsonapi: users
end
end
Metadata
Metadata
Assignees
Labels
No labels