Module: NuecaRailsInterfaces::V2::Pagination::BaseAdapter
- Included in:
- KaminariAdapter, PagyAdapter, WillPaginateAdapter
- Defined in:
- lib/nueca_rails_interfaces/v2/pagination/base_adapter.rb
Overview
Base adapter module for pagination strategies Modules must implement the .paginate(collection, page, per_page) method
Instance Method Summary collapse
-
#paginate(collection, page, per_page) ⇒ ActiveRecord::Relation
Paginate the collection based on the provided page and per page values.
Instance Method Details
#paginate(collection, page, per_page) ⇒ ActiveRecord::Relation
Paginate the collection based on the provided page and per page values.
14 15 16 |
# File 'lib/nueca_rails_interfaces/v2/pagination/base_adapter.rb', line 14 def paginate(collection, page, per_page) raise NotImplementedError, "#{name} must implement the .paginate(collection, page, per_page) method" end |