© 2017-2021 Domizio DemichelisMIT License

➡ Chat Support on Gitter ➡


The whole core structure of Pagy is very simple: it is organized around 3 small files of just above 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