Module: Godmin::Resources::ResourceService::Pagination
- Extended by:
- ActiveSupport::Concern
- Included in:
- Godmin::Resources::ResourceService
- Defined in:
- lib/godmin/resources/resource_service/pagination.rb
Instance Method Summary collapse
Instance Method Details
#apply_pagination(page_param, resources) ⇒ Object
7 8 9 10 |
# File 'lib/godmin/resources/resource_service/pagination.rb', line 7 def apply_pagination(page_param, resources) @paginator = Paginator.new(resources, per_page: per_page, current_page: page_param) @paginator.paginate end |
#paginator ⇒ Object
12 13 14 |
# File 'lib/godmin/resources/resource_service/pagination.rb', line 12 def paginator @paginator end |
#per_page ⇒ Object
16 17 18 |
# File 'lib/godmin/resources/resource_service/pagination.rb', line 16 def per_page 25 end |