[Rails] Re: Setting session to nil when window is closed

2008-10-30 Thread Shandy Nantz
Frederick Cheung wrote: > > You're wrong. There is only one cookie. it contains a serialised ruby > object (a hash to be quite precise) > > Fred I think I figured it out. I did a remote_function in my layout <% func = remote_function( :url => { :action => 'set_session_nil'} ) -%> ... a

[Rails] Re: Setting session to nil when window is closed

2008-10-29 Thread Frederick Cheung
On 29 Oct 2008, at 22:01, Shandy Nantz wrote: > > Frederick Cheung wrote: >> The associated >> value is either a serialized ruby object containing the session (if >> you are using the cookiestore) or just some completely opaque id that >> rails can use to grab the session from the db/memcache/fi

[Rails] Re: Setting session to nil when window is closed

2008-10-29 Thread Shandy Nantz
Frederick Cheung wrote: > The associated > value is either a serialized ruby object containing the session (if > you are using the cookiestore) or just some completely opaque id that > rails can use to grab the session from the db/memcache/filesystem. > (You could have worked some of this out just

[Rails] Re: Setting session to nil when window is closed

2008-10-29 Thread Frederick Cheung
On 29 Oct 2008, at 21:12, Shandy Nantz wrote: > > Frederick Cheung wrote: >> On 29 Oct 2008, at 20:22, Shandy Nantz wrote: >> >>> logout? Thanks, >>> >> Not in a fool proof way. You could have a window's onClose fire off >> an >> ajax request, but obviously that won't work if they have javascr

[Rails] Re: Setting session to nil when window is closed

2008-10-29 Thread Shandy Nantz
Frederick Cheung wrote: > On 29 Oct 2008, at 20:22, Shandy Nantz wrote: > >> logout? Thanks, >> > Not in a fool proof way. You could have a window's onClose fire off an > ajax request, but obviously that won't work if they have javascript > turned off, won't work if they just turn off their compu

[Rails] Re: Setting session to nil when window is closed

2008-10-29 Thread Frederick Cheung
On 29 Oct 2008, at 20:22, Shandy Nantz wrote: > > I have this app at work that has Administrators and Users as two types > of users. I know who is a of what type by setting session variables: > session[:admin] and session[:user] holding the id's. The > administrators > can go to any of the use