Build Load More Pagination with Pagy and Rails Hotwire

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • upperbracket

    Convenient way to generate full-stack Rails (Vite, Tailwind CSS, Rodauth, Rubocop)

  • As usual, we won't start everything from scratch. We'll focus on the core concept of 'Load More' pagination. To do that, we'll begin by creating a Rails application with the help of the UpperBracket template. If you're already using UpperBracket, you should be all set to follow along with this tutorial.

  • Pagy

    🏆 The Best Pagination Ruby Gem 🥇

  • Now, let's dive into the pagination part of this post: setting up Pagy for handling pagination in our Rails application. If you haven't included the Pagy gem in your project, you'll need to add it manually. Here's how you can do it:

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • turbo

    The speed of a single-page web application without having to write any JavaScript (by hotwired)

  • Take note of the "data-turbo-stream" attribute. We're configuring the form to be sent as a TURBO_STREAM instead of HTML. This feature was introduced in July 2022, allowing Turbo Streams even with GET requests. You can find more details in this pull request.

  • hotwire-load-more-pagination

    Build Load More Pagination with Pagy and Rails Hotwire

  • Download the source code hotwire-load-more-pagination

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts