However, if I change it to use the POST parameters in the conditions
instead, the pagination fails. It correctly shows that I have 14
records and also shows that there are 3 pages, but when I click on “next
page”, it gives me an error saying that I have a nil when I didn’t
expect it.
However, if I change it to use the POST parameters in the conditions
instead, the pagination fails. It correctly shows that I have 14
records and also shows that there are 3 pages, but when I click on “next
page”, it gives me an error saying that I have a nil when I didn’t
expect it.
I bet you are not sending the start and stop params on the subsequent
page requests. For example, I have some pages that need to send a
:query param with each request using this:
You are right - I had been trying for quite a while to figure out how to
send the parameters to the next page when using POST. However, I have
now migrated the form so that it uses GET and have used your code above
and it works fine!
Cheers
Mohit.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.