title: order_by in block each rails 3.1
body: <p>I have a loop for with order_by for :created_at and :desc </p>
  
  <pre><code>&lt;% for comment in post.comments.order_by([:created_at, :desc]) %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>How can I doing the order_by([:created_at, :desc]) in block with each, e.j:</p>
  
  <pre><code>&lt;% post.comments.each do |comment|%&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>Edited</strong></p>
  
  <p>The code that working fine for me its:</p>
  
  <pre><code>post.comments.order([:created_at, :desc])[0,5].each do |comment|
  </code></pre>
  
  <p>with the [0,5] limit the result to interval.</p>