title: Rails: List of categories where related items count is greater than 0
body: <p>Rails model:
  Categories have items</p>
  
  <p>Trying to get a list of categories that actually have items.</p>
  
  <p>Something like:</p>
  
  <pre><code>@categories = Category.where(category.items.count &gt; 0).all
  </code></pre>
  
  <p>Thanks!</p>