Basic Concepts
How To
Migrate WillPaginate/Kaminari
API
Pagy
Pagy::Backend
Pagy::Frontend
Pagy::Countless
Javascript
Extras
Arel
Array
Bootstrap
Bulma
Countless
Elasticsearch Rails
Foundation
Headers
I18n
Items
Overflow
Materialize
Metadata
Navs
Searchkick
Semantic
Support
Tailwind
Trim
UIkit
➡ Chat Support on Gitter ➡
The whole core structure of Pagy is very simple: it is organized around 3 small files of just ~100 lines of code in total:
File | Description |
---|---|
pagy.rb | It defines the small Pagy class that keeps track of the variables involved in the pagination |
pagy/backend.rb | It defines the optional Pagy::Backend module that you can include in your controllers in order to automatically create the Pagy instance |
pagy/frontend.rb | It defines the Pagy::Frontend module to include in your views in order to get a few helpers for the HTML output |
Besides the core files you can explicitly require optional extras that can handle special features, collections or environments.
See also: Global Configuration