Module: PaginationHeaders

Extended by:
ActiveSupport::Concern
Includes:
RequestType
Included in:
ApiController, ApplicationController
Defined in:
app/controllers/concerns/pagination_headers.rb

Overview

Injects Pagination headers.

To implement these headers add a line to your controller:

class OtusController < ApplicationController
   `after_action -> { set_pagination_headers(:otus) }, on: [:index], if: :json_request?`
end

We can also use the method directly within a view, but for uniformity we’ll do it like this.

For future reference see also www.w3.org/TR/ldp-paging/.

Method Summary

Methods included from RequestType

#json_request?