Class: Gearhead::Paginators::PagyPaginator
- Inherits:
-
Paginator
- Object
- Paginator
- Gearhead::Paginators::PagyPaginator
show all
- Includes:
- Pagy::Backend
- Defined in:
- lib/gearhead/paginators/pagy_paginator.rb
Instance Attribute Summary
Attributes inherited from Paginator
#collection
Instance Method Summary
collapse
Methods inherited from Paginator
#call, #initialize, paginate
Instance Method Details
#paginate ⇒ Object
8
9
10
|
# File 'lib/gearhead/paginators/pagy_paginator.rb', line 8
def paginate
@pagy, @collection = pagy(@records, items: per_page, page: page)
end
|
#serialization_options ⇒ Object
12
13
14
|
# File 'lib/gearhead/paginators/pagy_paginator.rb', line 12
def serialization_options
pagy_metadata(@pagy)
end
|