Pass the params please


I’m not figuring out an easy way to do this.

I’m trying to paginate and keep the params from my ‘find’ without making
it a fully blown method.

my params are

view code is relatively simple pagination stuff…

<%= link_to ‘Next page’, {
:page =>,
:params => params
} if %>

If I do it like shown above, my params are nameactioncontrollerclients
and that obviously doesn’t work.

If I do it like

:params[:right] => params[:right]

that returns an error

:params => params[:right]

wipes out other params




My experience is that the built-in helpers don’t do a great job of
preserving multi-dimensional hashes as you’re trying to do below. You’ll
probably need to write a helper method. And if you DO write a helper
or otherwise figure this out, please please share the solution :slight_smile: I’ve
the same problem but haven’t gotten around to fully addressing it.



Hey, at least you defined the terminology that wasn’t coming to me to
define the problem.

In this instance, I am not interested in working out a solution since I
was looking for a Q&D method which as you suggest, isn’t there.

I can obviously flatten the params hash within the controller or pass
them to session variables, etc. but I wanted Q&D and thus, have remedied
it by setting the ‘per page => ridiculously high’ since this is a simple
list that will never be all that long and usage is only the system
administrator (me).