Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to Add Pagination for Blog Posts in Rails Discussion

I like the manual approach of looking inside the pagy object and finding your way to get what you want! That is what I usually do instead of searching the doc :)

A simpler approach that I recommend for Pagy, is searching into the How To, which should give you the official and tested recipes to get what you want.

For example:
Skip Single Page Navs
Handle Pagy::OverflowError exceptions

I just realized that the README was lacking those very commonly needed details, and I added them to the example.

Thank you Chris!

Reply

Advice from the author himself! Thanks Domizio!

Reply

Hey Chris,

Awesome series. Learned a ton.

I followed this from the Path page and I see currently there are two paths only (Ruby for beginners and Build a blog with rails 7), correct me if I'm wrong though. Are there any more available ? Do I have to subscribe for them ?

Thanks

Reply

We will have more available soon. 👍

Some of the advanced ones later on will be paid but most will be free.

Reply

That's great.
Looking forward.

Thanks.

Reply

I have no idea why Pagy 9.3 does not render the widget properly on rails 7.0.8.6

Followed the instructions on pagy github repo for tailwind
The only way to get it to work is to downgrade pagy to "6.5"

Also if you are using HAML, it requires to use .html_safe to render the minimal widget on the page

  &= pagy_nav(@pagy).html_safe if @pagy
Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,563+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.