HI all,

I have an app that has a admin side and a user side. The users logging
into the admin side can view and edit profile, if need be, on the user
side. However, the user has three types: admin, travel manager, and
traveler. An admin logs in, the admin session is set. If the admin looks
at a user "Traveler" profile the traveler session gets set.

What I have noticed is that the admin instead of logging it, like they
should be, simply click the 'X'. Under certain conditions, I have
started to notice that this is causing some unwanted behavor and have
come to the conclusion that I need to make sure that the session
variables for both a traveler and a travel manager get set to nil when
the admin logs out of that profile or 'X's out.

My question is, how the heck do you do this? I could use javaScript but
then how would I call the controller method? I have read that there is a
onClose event in javaScript but it's not supportted in all browsers. Is
there a Rails way to do this? Thanks,

-S
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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