# How do i build this? is the only way to use session, or can

**URL:** <https://www.ruby-forum.com/t/how-do-i-build-this-is-the-only-way-to-use-session-or-can/101037>\
**Category:** Rails\
**Created:** [August 3, 2006, 3:39am UTC](https://www.ruby-forum.com/t/how-do-i-build-this-is-the-only-way-to-use-session-or-can/101037 "2006-08-03T03:39:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![koloa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/4bbf92/32.png) [@koloa](https://www.ruby-forum.com/u/koloa)\
**Post date:** [August 3, 2006, 3:39am UTC](https://www.ruby-forum.com/t/how-do-i-build-this-is-the-only-way-to-use-session-or-can/101037/1 "2006-08-03T03:39:06Z")

</div>

i pass and save muliple paramters between different views with different  
models?

what i am trying to do use instead of the user filling out forms to  
search my database, i just want them to click on links. the first link  
selects data from one table and then a different view of links will be  
displayed. the user will then click on a new link but i will need to  
also know what the user clicked previous to be able to grab the correct  
information…

thoughts? i am reading the session part of agile development with rails  
right now.

---

<div class="post-metadata">

**Author:** ![koloa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/4bbf92/32.png) [@koloa](https://www.ruby-forum.com/u/koloa)\
**Post date:** [August 3, 2006, 11:03am UTC](https://www.ruby-forum.com/t/how-do-i-build-this-is-the-only-way-to-use-session-or-can/101037/2 "2006-08-03T11:03:03Z")

</div>

Koloa,

AFAIK, you have here two possiblities:

1. use session data
2. use forms, and passing data with hidden\_fields.

Are you OK with that?

Jean-Etienne

---

<div class="post-metadata">

**Author:** ![koloa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/4bbf92/32.png) [@koloa](https://www.ruby-forum.com/u/koloa)\
**Post date:** [August 3, 2006, 2:23pm UTC](https://www.ruby-forum.com/t/how-do-i-build-this-is-the-only-way-to-use-session-or-can/101037/3 "2006-08-03T14:23:30Z")

</div>

you can use a before\_filter, in this before filter you can store the  
user  
click info in a stack, that way you will have the eariles click info on  
the  
top and oldest on the bottom. Store this stack in the session.

If you want to store parameters you can do that too just put the params  
object in session.

hope this helps

-daya

---

<div class="post-metadata">

**Author:** ![koloa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/4bbf92/32.png) [@koloa](https://www.ruby-forum.com/u/koloa)\
**Post date:** [August 3, 2006, 2:23pm UTC](https://www.ruby-forum.com/t/how-do-i-build-this-is-the-only-way-to-use-session-or-can/101037/4 "2006-08-03T14:23:32Z")

</div>

On Wednesday, August 02, 2006, at 9:45 PM, linux user wrote:

> > also know what the user clicked previous to be able to grab the correct  
> > removed\_email\_address@domain.invalid  
> > [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

You can also just pass the parameters from your previous call to the  
next one in the chain.

\_Kevin  
[www.sciwerks.com](http://www.sciwerks.com)
