-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch_back as a link #51
Comments
Internally, I use session[:original_user] to store the original user. Checking to see if that exists will tell you if you've switched from another user. FYI This is definitely going to change because I definitely shouldn't be storing the whole user object in the session. HTH |
Hi, you mean you're storing the whole user object? I think it would be ok to store just the ID. |
Just checked it, |
Examine the entire session variable if you can. It may be under session[:original_user_scope_identifier] at this point in time. |
Added |
Hmmmm are you using the switch_back feature ? You can read about it in the read me. |
Hmm I think yes, here is an excerpt from my
|
try this in your switch_user.rb
and then something like this in your view
|
Is there a simple way to detect that I have switched to a user and display a switch_back link? I tried to check for
original_user
in the view, but it doesn't work this way.The text was updated successfully, but these errors were encountered: