curl http://exemplo.com.br --cookie-jar cookie | grep csrf
The --cookie-jar option creates a cookie in a file called "cookie" xD. This cookie is needed to validate the POST request
The command above will output something like this
<meta name="csrf-token" content="rfk1uPeJdFwIpyOFpyfCX9GMVA/RSmZRWsje52OA4FtDjVG8eCoppYvn2OIyS8sIUesAmOBJbd2ey0B7zay9yA==" />
Copy the content of meta tag csrf-token
curl http://exemplo.com.br/controller_name/post_action --cookie-jar cookie --cookie cookie\
--data-urlencode "authenticity_token=rfk1uPeJdFwIpyOFpyfCX9GMVA/RSmZRWsje52OA4FtDjVG8eCoppYvn2OIyS8sIUesAmOBJbd2ey0B7zay9yA=="\
--data "modelName[attribute]=Value of the attribute to store"
And log rails:
That is strangely (((