title: Rails record where at least one association with attribute value
body: <p>I have a model <code>Purchase</code> which <code>has_many</code> <code>products</code>. I want to pull all the <code>purchases</code> which have at least one <code>product</code> which has been fully paid for.</p>
  
  <p><code>Product</code> has a <code>status</code> where <code>status 4</code> means it has been fully paid.</p>
  
  <p>I tried defining a scope in the <code>Purchase</code> model:</p>
  
  <pre><code>scope :full_paid, -&gt; {
    joins(:products).where(products: { status: 4 })
  }
  </code></pre>
  
  <p>But this only pulls purchases for which all the existing <code>products</code> are fully paid. Can I instead pull all the purchases which have at least 1 fully paid product?</p>