Forum: Ruby on Rails Passing parameters along

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.
A24e589de07cb769a71f28aead957a48?d=identicon&s=25 Duane (Guest)
on 2006-01-04 18:17
(Received via mailing list)
I have a simple form that asks for three variables:  column, operation,
and data, which will allow my user to say things like "username starts
with A" or "email address contains hotmail".

This all works.  I build up a conditions string and feed it into a

What I'm working on now is making sure that my next and previous page
buttons continue to work.  Will Ruby automatically take those params
with it as part of the link_to() that I am using?  Or do I have to
explicitly pass along those parameters so that when the list comes back
around do display page 2, it still remembers what conditions we are

Assuming that I have to pass them explicitly, is there a shorthand way
to simply say "take everything that's already in params"?  I tried this:

link_to "Next", { :page =>, params }

in the hopes that it would just append params onto the list, but got a
syntax error.

C8a634a01a2c4508360874bff7fb1a7f?d=identicon&s=25 Kevin Olbrich (Guest)
on 2006-01-04 18:52
I think you either need to explicitly pass them as params or store them
in the session.  Passing params leads to horrible urls and potential for
user hackery. If you store it in the session using a key like
'controller/action', then it will persist with the session and shouldn't
tromp on other session entries.
This topic is locked and can not be replied to.