On Sat, 2006-06-24 at 14:21 +0200, Julian ‘Julik’ Tarkhanov wrote:
be having two or three parallell browsing sessions
in a handful of windows. The basic workflow goes like this: you
override the url_for method on the controllers that have to preserve
find criteria and keep your hash of finder configuraton in there. On
the next request you reinstantiate the find based on the criteria
via the URL.
This of course depends on how good yo0u manage to compress your find
criteria into a string but that’s what works for me.
well, on one particular model, I have 20 ‘find values’ (I am using
Ezra’s ez_where - find on steroids plugin) and I can see the next model
that I am going to add will have a similarly large amount too.
The notion of passing the values as params only goes so far and while it
may work for blog applications, a deeper web application needs
persistence for a decent UI - consider that a user executes a find which
then presents a list mode. If the user edits one of the records and
saves (or cancels), the user then returns to the list and I want the
‘found’ items to persist rather than force the user to start over.
Likewise, most of the column headers in the list view mode are links to
sort the currently found items. I need persistence.
I switched to ActiveRecord based sessions.
I wonder if using cookies to store this info might be better.
Thus for a few simple models, I am passing the find information in the
parameters hash but the models that are doing the heavy lifting need
persistent values and I have perhaps 50 objects in my session and I am
wondering if I am doing overkill.