ddnexus / pagy
🏆 The Best Pagination Ruby Gem 🥇
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing ddnexus/pagy in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewPagy the leaping gem! _Agnostic pagination in plain ruby_ Version 43 We needed a leap version to unequivocally signal that it's not just a major version: it's a complete redesign of the legacy code at all levels, usage and API included. **Why 43?** Because it's exactly one step beyond _"The answer to the ultimate question of life, the Universe, and everything."_ 😉 Improvements This version introduces several enhancements, such as new and paginators and improved automation and configuration processes, reducing setup requirements by 99%. The update also includes a simpler API and new interactive development tools, making it a comprehensive upgrade from previous versions. • **New :countish Paginator** • Faster than OFFSET and supporting the full UI • **New Keynav Pagination** • The pagy-exclusive technique using the fastest keyset pagination alongside all frontend helpers. • **New interactive dev-tools** • New PagyWand to integrate the pagy CSS with your app themes. • New **Pagy AI** available right inside your own app. • **Intelligent automation** • Configuration requirements reduced by 99%. • Simplified JavaScript setup. • Automatic I18n loading. • **Simpler API** • You solely need the pagy method and the @pagy instance to paginate any collection and use any navigation tag and helper. • Methods are autoloaded only if used, and consume no memory otherwise. • Methods have narrower scopes and can be overridden without deep knowledge. • **New documentation** • Very concise, straightforward, and easy to navigate and understand. Upgrade to 43 See the Upgrade Guide Take a look at the Examples for a quick overview of the new API. 💚 v3 was already quite good... 💚 Now it's more... with less • Compatible with all environments and collection types • It can use OFFSET, COUNTISH, COUNTLESS, KEYSET, KEYNAV, SEARCH, CALENDAR, pagination techniques • It supports server-side rendering or faster client-side rendering for popular CSS frameworks and APIs • It autoloads ONLY the methods that you actually use, with almost zero configuration • It boasts 100% test coverage for Ruby, HTML, and JavaScript end-to-end (E2E) 💚 Examples Pagination code _See all the available paginators_ JSON:API pagination JSON-client pagination Search server pagination Available paginators: , , , Calendar pagination Combine and pagination. _(Available time units: year, quarter, month, week, and day)_ Server side rendering Default , and styles shown. Client side rendering **Faster and responsive** Dynamically fills the container width. **Fastest!** Combines navigation and info in minimum space. 💚 Dev Tools Integrate pagy with your app's themes interactively (watch demo), and ask specific questions to the Pagy AI __right in your app__! You need only a single line in your page/layout to get the Pagy Wand and the Pagy AI: 💚 Support and Docs • Quick Start • How To (quick recipes) • Migrate from WillPaginate and Kaminari (practical guide) • Discussions • Issues • Changelog Top 💯 Contributors [<img src="https://avatars.githubusercontent.com/u/640 _...truncated for preview_