I've noticed that pagination gems like mislav-will_paginate
are quite popular. Is this because Rails does not have a built-in pagination solution or because the built-in solution is not very good?
will_paginate 3.1. 6 will_paginate provides a simple API for performing paginated queries with Active Record, DataMapper and Sequel, and includes helpers for rendering pagination links in Rails, Sinatra and Merb web apps.
In Rails 2.0 the pagination ability of ActionController was removed and turned into a plugin for backwards compatibility called 'classic_pagination'. However, from my searches for a pagination solution for myself the consensus seems to be that using 'classic_pagination' is not optimal.
After watching a couple of podcasts and after several recommendations I opted to try the will_paginate plugin and haven't looked back. It's fast, easy to use and well-maintained.
I believe that even V2 of Searchlogic recommends its use.
If you are using Rails 3 Kaminari plugin will be very handy for pagination. Github Railscasts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With