title: execute ruby code on click of a button
body: <p>I have two buttons in my page.html.erb file that updates the values in a table. </p>
  
  <pre><code>&lt;div class="container container-1"&gt;
  &lt;button class="_button _button-2"&gt;action1&lt;/button&gt;
  &lt;button class="_button _button-3"&gt;action2&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When I press a button I want it to execute a piece of code in the pagecontroller and display the result in the table. I am able to do all these but struck at recognizing button. How do I execute ruby code on click of the buttons? I want to do it with rails not JavaScript.</p>