gitwtfhub

wtf is pagy?

gjtorikian/pagy — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2024-08-03

Audience · developerComplexity · 2/5StaleSetup · easy

TL;DR

A fast, lightweight Ruby pagination library that splits long lists of data into pages and generates navigation links for Rails and other Ruby web apps.

Mindmap

mindmap
  root((repo))
    What it does
      Splits data into pages
      Generates nav links
      Works with any data source
    Tech stack
      Ruby
      Rails
    Use cases
      Paginate database results
      Paginate search results
      Serve JSON pagination
    Audience
      Ruby developers
      Rails developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Add paginated 'next/previous' or numbered page navigation to a list of database records in a Rails app in just a few lines of code.

REASON 2

Paginate results from Elasticsearch, plain in-memory arrays, or JSON APIs, not just database queries.

REASON 3

Serve pagination data as JSON to a Vue or React frontend instead of rendering HTML page links.

REASON 4

Style pagination navigation automatically using Bootstrap, Tailwind, or Bulma CSS frameworks.

What's in the stack?

RubyRails

How it stacks up

gjtorikian/pagy0verflowme/alarm-clock0verflowme/seclists
LanguageCSS
Last pushed2024-08-032022-10-032020-05-03
MaintenanceStaleDormantDormant
Setup difficultyeasyeasyeasy
Complexity2/52/51/5
Audiencedevelopervibe coderops devops

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Advanced features like Elasticsearch or JSON:API support require enabling optional extras.

License information is not specified in the explanation.

Yoink these prompts

Prompt 1
Show me how to add Pagy to my Rails app to paginate a list of products, including the controller and view code.
Prompt 2
Help me configure Pagy to output pagination navigation styled with Tailwind CSS.
Prompt 3
How do I use Pagy to paginate Elasticsearch search results in my Ruby app?
Prompt 4
Explain how to switch from page-number pagination to infinite scroll using Pagy.

Frequently asked questions

wtf is pagy?

A fast, lightweight Ruby pagination library that splits long lists of data into pages and generates navigation links for Rails and other Ruby web apps.

Is pagy actively maintained?

Stale — no commits in 1-2 years (last push 2024-08-03).

What license does pagy use?

License information is not specified in the explanation.

How hard is pagy to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is pagy for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.