Will Paginate is a great and widely used gem for pagination in Ruby on Rails.
Sometimes you need to paginate multiple list on the same page.
This tip show you how to put a list of paginated products and a list of of paginated services on the same page with will_paginate.
The key point is to use a custom param param_name in the view and also in the controller
The view code is something like this:
1 |
# ... |
1 |
1 |
# services list here |
And this is the code in the controller
1 |
# ... |
Save more time and effort by using this free and complete designer checklist.