:params, pagination_links, and the select helper form....

I have this page that renders a table of data that I'd like to display
in multiple pages. I'm trying to use pagination_by_sql and
pagination_links, but I have a problem figuring out how to re-recreate
the url generated by a select helper form in order for the pagination
links' parameters to be in the right format.

To elaborate, I have data that is generated by form select helpers
like the following:

<%= select(:filter_key, :received_at, @select_dates ) %>
<%= select(:filter_key, :user, @select_users ) %>

So, when submitted, the url will look like this:


And subsequently, the params hash becomes:

params => {"commit"=>"Filter","action"=>"list","filter_key"=>{"user"=>"ADMIN","received_at"=>"2006-10-17"},

Notice how filter_key is a hash containing the keys "user" and
"received_at". In my controller, I set
@filter_keys = params[:filter_key]
so that I could parse the data to create my sql query. This makes
@filter_keys to be

Now, in the resulting page, I used pagination_links to give me the following:
<%= pagination_links(@audit_record_pages,:params => {"filter_key" =>
{@filter_keys}}) %>

If I hover over the link to page 2, I see what's going to be passed
through the url:

which is different from the original url. And so, my code breaks
when trying to parse out

Seeing how pagination_links flattens out the hash in a manner
different from when using form selects, are there any suggestions on
how I can get around this?

Thanks in advance,