Pagy is a pagination gem that provides agnostic pagination in plain Ruby, working across multiple frameworks and backends without framework-specific dependencies.
Pagy solves the problem of implementing pagination across diverse Ruby applications by offering a framework-agnostic approach. Rather than coupling pagination logic to a particular framework, it provides core pagination functionality that integrates with Rails, Sinatra, Hanami, Padrino, and other Ruby web frameworks. The tool works with various data sources including standard ActiveRecord queries, Elasticsearch, Meilisearch, Typesense, and JSON APIs, allowing developers to paginate results regardless of where the data originates.
Developers should choose Pagy if they need pagination that works consistently across multiple frameworks or if they want to avoid framework lock-in. It suits projects ranging from simple Rails applications to complex multi-framework systems and those using alternative search backends. The tool is particularly valuable for applications that need to support different data sources or for teams working across heterogeneous Ruby stacks.
The project maintains comprehensive test coverage and passes both API and end-to-end test suites. Code quality is enforced through static analysis checks. The tool has undergone a complete redesign at all levels, including its usage patterns and API, to simplify setup and reduce configuration requirements. Development activity includes ongoing refinement of paginators and interactive tooling to support developers during integration.