I am using api_auth
to sign my requests. I have a link_to button that makes a get request to a controller (allowing my admins to sign in as any users via Devise
).
link_to "Click Here", "https://localhost:3000/sign_in_as_user?admin_user=#{current_user.id}&user_id=#{s.id}", target: "_blank"
I've read through the api_auth
doc (https://github.com/mgomes/api_auth) and see how I can generate a signed request in controllers.
However, I want to be able to create a signed_request when I click on the above link_to
tag.
How do I successfully sign a link_to get request?