David Kimura PRO said over 4 years ago on Multitenancy :
My first instinct is to go the cookie at the session level route. When the session is destroyed their current company is cleared. Since this functionality is switching and not really related to persistency, I would avoid storing it on the user model. However, that said, it may make sense to have a preferences model (or attribute on the user model) for "default company" which would allow the user to select what their preferred company is.