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 user pages as needed. When that happens the two
> session variables - :admin and :user - get set. The issue is that
> sometimes the admins dont "logout" of those user pages and the :user
> session remain set - they simply close the form. Is there a way to set
> those sessions to nil whenever that window is closed if they dont
> 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 computer or if  
their broadband dies, might not work if they quit their browser etc...

Fred

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to