title: rails link_to with post request and a payload (json object)
body: <p>I would like to send a post request from one route (main route) to another route with a link_to link and a payload so that the controller that will get this request will access a json file (or another data fetched from DB) my current rails link_to code is:</p>
  
  <pre><code>&lt;%= link_to "{{product}}", controller: 'main', action: 'product', payload: 'msg', method: :post , tabindex:14 %&gt;
  </code></pre>
  
  <p>which passes payload: 'msg' as a GET request parameters !
  what is seen on browser path is:</p>
  
  <pre><code>http://localhost:3000/product?method=post&amp;payload=msg&amp;tabindex=14
  </code></pre>
  
  <p>What I would like to do is send the payload in a POST request without the parameters seen on screen.
  another issue - I would like to instead of sending 'msg', query my database (Product.find(1) for example) and the results I would like to send as a payload. How would I later access this object?</p>