title: Call a custom controller action method from a 'link_to'
body: <p>I am using Ruby on Rails 3 and I would like to state an action method in a my controller file so that in my view files I can use something like the following:</p>
  
  <pre><code>link_to("Delete", posts_path(@post.id), :method =&gt; :delete)
  </code></pre>
  
  <p>That is, to have a link so that I can "directly" call and run an action method in my controller.</p>
  
  <p>In the above code, for example, it is possible to call the <code>destroy</code> method adding <code>:method =&gt; :delete</code>.</p>