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.
then how would I call the controller method? I have read that there is a
there a Rails way to do this? Thanks,