title: Call boolean instance method as a 'scope'
body: <p>I have a model</p>
  
  <pre><code>Email
  </code></pre>
  
  <p>and an instance method</p>
  
  <pre><code>def sent_to_user?(user)
    self.who_to == user
  end
  </code></pre>
  
  <p>where who_to is another instance method doing some complicated stuff to check.</p>
  
  <p>There's a lot more stuff going on in the background there so I can't easily turn it into an activerecord query. </p>
  
  <p>I want to do something like: </p>
  
  <pre><code>scope :sent_to_user, -&gt; (user) { sent_to_user?(user)} 
  
  @user.emails.sent_to_user
  </code></pre>
  
  <p>and return a only those emails that return true for 'sent_to_user?'</p>
  
  <p>Have tried</p>
  
  <pre><code>scope :sent_to_user, -&gt; (user) { if sent_to_user?(user)} 
  </code></pre>
  
  <p>....etc. </p>
  
  <p>Not quite sure how to build that scope / class method</p>