Forum: Ruby on Rails pass the params please

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
C1e5a9e9344b6d31b9df7303e6dc378a?d=identicon&s=25 Craig White (Guest)
on 2006-04-23 03:30
(Received via mailing list)
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


43ec5998360a0cc21b51afef1781e9c0?d=identicon&s=25 Daniel Higginbotham (Guest)
on 2006-04-23 03:51
(Received via mailing list)
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 :) I've
the same problem but haven't gotten around to fully addressing it.

C1e5a9e9344b6d31b9df7303e6dc378a?d=identicon&s=25 Craig White (Guest)
on 2006-04-23 04:18
(Received via mailing list)
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).


This topic is locked and can not be replied to.