searching with pagination

I've got a search action that submits to itself and allows users to
search through a list of people by firstname and/or lastname.

On submitting the form the action detects POST method, performs the
search and renders a results template.

My question is how can I integrate pagination with the search results?

If I use pagination like normal it will revert to GET method and thus
display the search form again.

What is the accepted procedure for doing this?

Thanks

Matt

What pagination method or plugin are you using?

Erol Fornoles wrote:

Correct me if I'm wrong, but you want the pagination link to be
rendered as POST methods, right? Have you tried creating your own
custom link render?

Erol Fornoles wrote:

I'm currently using will_paginate, which works beautifully for the main
contact list.

I'm just not sure how to get it integrate with a POST search.

Thanks

Matt

Correct me if I'm wrong, but you want the pagination link to be
rendered as POST methods, right? Have you tried creating your own
custom link render?

I haven't tried doing it myself yet, I just thought there would be a
problem as each click of a standard page link would be a GET request and
that would cause the action to display the form instead of the results.

I think I have an idea how to get round it so I'll post again if I'm
still in trouble :slight_smile:

Thanks

Matt

Give the custom link renderer a try first and render your pagination
links with link_to :method => :post.

Hi Matt