Passing parameters along

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.


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.