How to display user data from one page on another?

Can someone point me at some code that shows how to create a controller
and a view that prompts the user to enter some data, and then displays
this same data on another page (and I don’t want to persist this to the
database).

For instance, let’s say I had a search page that had the following

  • a text input field that prompted the user to enter a search term
  • text input fields that prompted the user for a date range (a text
    field for start date, a text field for end date)
  • a drop down list that allowed users to pick an arbitrary category (or
    all categories)
  • a submit button

Suppose a user entered “beer” as their search term, “03/10/05 -
08/24/2006” as their date range, and they selected the category “Beers
of Canada”

How would I get this page to link to another view in the same controller
that would say:

  • the search term you entered was: beer
  • the date range you selected was 03/10/05 - 8/24/2006
  • the category you entered was: Beers of Canada

Thanks!
Dominique

session[:remember_next_page] = params[:category]

hello,
i did something similiar. all i did was use link_to and pass however
amount of parameters i wanted to remeber to the next view.

Say you have a action named form

and another it posts to called display

when you submit the form have it submit to the action display

then in your controller in the display action

you can just access those params and display them in your view

I will try that and let you know

Clayton C. wrote:

Say you have a action named form

and another it posts to called display

when you submit the form have it submit to the action display

then in your controller in the display action

you can just access those params and display them in your view