title: how can I specify controller and method in a link using haml with rails?
body: <p>I am new in ralis, and I am trying to create a link in what calls an specific method of a specific controller, in this case car and method add_to_cart sending a parameters, unfortunately I dont know how to do it </p>
  
  <p>For example, I want something this, but even if I scape characters </p>
  
  <pre><code>= link_to "Add to cart", {:controller =&gt; "car", :action =&gt; "add_to_cart", :car =&gt; car.id }
  </code></pre>
  
  <p>If I paste it just like that I get an error saying <strong>No route matches</strong> , any way to make it? or maybe in the old format (I dont understand it) I guess should be something like </p>
  
  <pre><code>=link_to "car", add_to_cart_car_path(@car.id), class: "btn"
  </code></pre>
  
  <p>Also shows me an error,</p>
  
  <p>Any idea of this?</p>