Pagination and accessing old objects/parameters

Hi all,

I am trying to use the pagination capabilities in a search tool that I
have. A search view takes several parameters provided in text input and
drop down boxes. Submitting the form causes a POST call to :action =>
‘search’. I generate some DB conditions based on the parameters and do a
paginate. Everything gets shuttled off to the view again and things get
rendered nicely… at least the first time.

The problem arises when the user clicks on one of the links generated by
pagination_links. This generates a GET request back to :action =>
‘search’. All my search parameters from the input boxes and drop-downs
that I used to filter the DB query are lost.

I imagine that there must be a simple way to get at what I lost so that
I can do a pagination again, only for a different page, but I am a
relative RoR newby, and don’t know what to do.

Any help is appreciated.

Garth

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs