I am implementing a search for my blog. I have it as you can type in
and words, and I keep them as session variables. I was just thinking if
this was a good idea ?
I saw on learning ruby on rails, that Ryan put such a search in a model
kept it in a database.
My site is hardly anything like twitter. So I would really like to hear
what you have to say about this.
This may depend on what you want to do with those keywords:
When why keep them at all? Run the search and forget them
Or redisplay in the searchbox for next search, for that you can
still get them from the params at this stage.
Keep the actual search for redisplay next time the user comes back
You could keep them in the session, but would lose them if the user
Run statistics what users are searching
Then you must keep them in the database
So I think there is not that much use in keeping them in the session.
Keeping them in the database makes sense if you store every single
My idea is that as soon as the user leaves the website it should go
No need to keep the query around.
This just ends up in an array and will be run with :conditions on the
On Wed, Aug 12, 2009 at 3:07 PM, Thorsten MÃ¼ller <