0

I am using Kaminari gem with my rails 3.2 application. Its working fine. Now i want to add a custom page number text field where user can provide a page number and by hitting return key should load the required page number. What is the best approach to implement this functionality?

Arif
  • 1,369
  • 14
  • 39

1 Answers1

0

Each of the result pages differ in the parameter used for page.

Eg: If the main url is http://www.my_site.com/my_list, the urls for the various pages would look as follows:

So you just need to set page=params[:required_page_number] to get the right page.

Prakash Murthy
  • 12,923
  • 3
  • 46
  • 74