reset_sessions how to?

Hi,

  Thanks for pointing it out. I'm sorry, sometimes i ask some stupid questions. since my english is weak . Forgive me :slight_smile:

  My answer is yes, the session prevails though i kill the server.   How can i overcome this by clearing the session information each time the rails server is killed.

Thanks and Regards, Vimal Das

Have you tried:

rake db:sessions:clear

it says -> uninitialized constant ActiveRecord

I am not using active_record for storing session information. it is the cookie store session as Fred has suggested.

Would i be able to trap the Ctrl-c interrupt and then call reset_session? But i dont know the proper way to do it

reset_session only clears out the session associated with the current request. Unless you are in the middle of processing a request it is meaningless.

Fred

I have tried it before and got the same as you said.

You can invalidate it by changing your session's secret (make sure you deal with the exception that gets raised in those cases if you don't want to confuse your users). Pretty much a manual process which ever store you use.

Anyway the above suggested solution is only possible if Ctrl-c interrupt is trapped and then routed to the proceedure

Regards, Vimal Das

Possibly you could do it by changing the secret on starting the server up rather than when killing it off. Colin