In Ruby on Rails, there are three ways to do pagination:
- 1. Simple pagination
- 2. Custom pagination
- 3. Plug-in pagination
Pagination will always take place in the Controller, where you’ll both find the records in the database to display and determine the pagination information. The View will take care of displaying the results of the pagination, but the heavy lifting will already be done. For that reason, let’s hold off on looking at how to display pagination results in the View until we’ve examined the first two types of Rails pagination.