Does Rails have a built-in pagination solution?

propstop picture propstop · Jun 8, 2009 · Viewed 26.9k times · Source

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?

Answer

digitalpardoe picture digitalpardoe · Jun 9, 2009

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.