-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
#{name}_masquerade_owner is broken #116
Comments
Hi @ilya-konanykhin . everything is reasonable, going to apply the patch during the day. session/cache changes were applied fast enough by me and I missed it. thank you for the report! |
Hi @ilya-konanykhin please give a try 2.0.2 if it works for you. thank you! |
Thanks a lot @oivoodoo that fixed it! However I think there's another bug, let me investigate and create another issue ticket. |
Nevermind, it's just us using your code the way it wasn't intended to be used. Thanks again for fixing the bug! |
@ilya-konanykhin thank you! |
Looks like
#{name}_masquerade_owner
is broken. It always tries to find a resource by GlobalID: https://github.com/oivoodoo/devise_masquerade/blob/master/lib/devise_masquerade/controllers/helpers.rb#L53-L63However, when the owner resource ID is being written, it is GlobalID only when using cache, when using session it is plain
to_param
: https://github.com/oivoodoo/devise_masquerade/blob/master/app/controllers/devise/masquerades_controller.rb#L168-L175Or maybe I'm missing something?
The text was updated successfully, but these errors were encountered: