Closed madmax closed 3 years ago
If we pass any additional argument to masquerade_path it will create bad URL
masquerade_path(user, test: 1)
/users/masquerade/1.masquerade=CAhfsUnYawRLvUb3QxXYGQ&masqueraded_resource_class=User&test=1?masquerade=CAhfsUnYawRLvUb3QxXYGQ&masqueraded_resource_class=User&test=1
This is because in url_helpers.rb#masquerade_path we pass options twice url helper
send("#{scope}_masquerade_path", resource, opts, *args)
opts are correctly exteracted but we pass them again in *args.
Hi @madmax . Sorry for delay on the issue. it looks like I've just fixed it by #79 . 1.3.1 could probably solve the issue or bring more who knows :)
1.3.1
If we pass any additional argument to masquerade_path it will create bad URL
This is because in url_helpers.rb#masquerade_path we pass options twice url helper
opts are correctly exteracted but we pass them again in *args.