title: Use of the can? method with a each
body: <p>When I read the documentation of cancan you can do something like this:</p>
  
  <pre><code>&lt;% if can? :edit, @product %&gt;
  </code></pre>
  
  <p>Now I have the following code and there it doesn't work.</p>
  
  <pre><code>&lt;% @products.each do |product| %&gt;
    &lt;% if can? :sort, |product| %&gt;
      MyButton
    &lt;% end %&gt;
  </code></pre>
  
  <p>How can I make sure this works as well?  What syntax do I need to use?  I hope I don't need to do a </p>
  
  <pre><code>@product = Product.find(|product|.id)
  </code></pre>
  
  <p>because that would clutter the views.</p>