I need to add an auth header to the request. I tried to add:
:headers => $auth_headers
In the method:
link_to("Verify", agency_verify_path(agency), :method => :put, :headers => $auth_headers)
Token authentication failed.
You cannot set headers in link_to.
link_to
Create a controller action that sets the correct headers and redirects the user to the destination.
Also, prefer auth_headersor @auth_headersover $auth_headers.
auth_headers
@auth_headers
$auth_headers
Source: https://habr.com/ru/post/1607883/More articles:How to implement firebase server-side protection - javascriptHTML text input conditional submit - javascriptcomparison if void * contains 0 numbytes? - cdynamic key manipulation with dictionary keys - pythonError installing Eclipse IDE on windows - javaSort multiple XML files by dates and combine them into one with XSLT - xmlA growing view of text input - quick examples - iosWhat happens under the hood of these conditions? - phpNSDataWithContentsOfURL data is null after upgrading Xcode 6.4 to Xcode 7.0 - jsonMS Edge SEC7117 Error loading PNG - htmlAll Articles