devise_masquerade icon indicating copy to clipboard operation
devise_masquerade copied to clipboard

Print originating user name

Open webbastelbude opened this issue 3 years ago • 1 comments

Hi,

is there any way to get the details from the originating user?

I want to display "Switch back to " in the navigation.

Thx and greetings

Holger

webbastelbude avatar Sep 11 '22 18:09 webbastelbude

You can use the #{name}_masquerade_owner to get the instance that is masquerading, and then call it's name method.

So for example, if your user-class is called User, you could call user_masquerade_owner to get a reference to the instance of the class that is masquerading

SebRollen avatar Jan 05 '23 19:01 SebRollen