Keeping search selections

Hey people,

I was wondering if there’s an easy way in rails to have select dropdowns
keep the option that was selected before a search is performed.
According to someone I work with it is possible to do this in an easy
way in rails, so I hope anyone can point me in the right direction…

Many thanks,

Danny

I’m just guessing here but sounds like sessions or cookies, probably
sessions, is the key. Anyone got experience with this? I dunno myself.

RSL

On 3/14/07, Daniel Owen van Dommelen [email protected]

Russell N. wrote:

I’m just guessing here but sounds like sessions or cookies, probably
sessions, is the key. Anyone got experience with this? I dunno myself.

RSL

On 3/14/07, Daniel Owen van Dommelen [email protected]

Yes, this options, while it’s probably possible to go this way, I would
really like to find a cleaner method to do so. The problem is that the
selects are generated using rails helper methods and the options are
automatically generated from arrays defined in application_helper.rb.
This makes it so I can’t use a for loop or whatever to check if the
current equals the stored session/cookie data… I am SO sure
rails must have thought of this before…

thanks anyway though…