If you do a Google or Google Maps search, a large number of parameters is
On Sun, Aug 16, 2009 at 21:08, eagle1 <apori...
> I was wondering how to get will_paginate to work when the request is
> not a GET but a POST? In an advanced search form, using a GET
> sometimes is not feasible since too many parameters are passed so I
> need to use POST.
passed in the URL anyway—but it still works as long as the URL is not the
size which browsers can't handle (I don't know which is that size). These
URLs are better because they are bookmarkable. People want to bookmark or
share search results, *especially* if they're from advanced search forms.
Now if you really want to use POST, the only correct way to do pagination in
HTML would be to render a form inside which each pagination link is a submit
button with the attribute name="page" set to page number as value. This form
should also preserve existing search parameters, therefore it should have a
hidden field for each of the current parameters. Clicking on the submit
button will resubmit the advanced search with the page parameter changed.