title: rails: link_to into another controller with params
body: <p>How do I make a link_to point to an action in another controller including parameters. I have an array of transactions that reference a product id. I'm trying to make each transaction link to it's product.</p>
  
  <p><strong>controller</strong></p>
  
  <pre><code>def page
    @transactions = Transaction.all
  end
  </code></pre>
  
  <p><strong>page</strong>(haml)</p>
  
  <pre><code>- @transactions.each do |x|
    = link_to "Product", {controller: "product", action: "show", id: x.product_id} 
  </code></pre>
  
  <p><strong>error</strong> </p>
  
  <pre><code>No route matches {:controller=&gt;"product", :action=&gt;"show", :id=&gt;38}
  </code></pre>
  
  <p><strong>rake routes</strong></p>
  
  <pre><code>product GET    /products/:id(.:format)     products#show
  </code></pre>