title: How can I sort records ordered by datetime?
body: <p><code>@comments</code> has 10 records sorted by <code>id ASC</code> now.<br>
  I wanted to reverse order simply, so I coded <code>@comments = @comments.reverse</code></p>
  
  <p>But I get this error message</p>
  
  <pre><code>ActionView::Template::Error (undefined method `total_count'
  &lt;%= page_entries_info(@comments, :entry_name =&gt; 'comment').html_safe %&gt;
  </code></pre>
  
  <p>If I take off reverse and leave it as <code>@comments = @comments</code>, there won't be any problem. 
  Why? and How can I sort it ordered by <code>created_at DESC</code>?</p>
  
  <pre><code>@comments = Comment.where(:user_id =&gt; user_ids, :commentable_type =&gt; commentable)
  
  if params[:page].blank?
      params[:page] = ((@comments.count - 1)/10) + 1
      @comments = @comments.page(params[:page]).per(10)
  else
      @comments = @comments.page(params[:page]).per(10)
  end
  
  @comments = @comments.reverse
  </code></pre>