#{name}_masquerade_owner is broken
ilya-konanykhin opened this issue · comments
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-L63
However, 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-L175
Or maybe I'm missing something?
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.
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!