title: Query with a model method?
body: <p>I'm having an issue performing a query for only objects that are active. I do not have an active column in the database, instead, on a model Game, I have the following method:</p>
  
  <pre><code>def complete?
    self.winner ? true : false
  end
  </code></pre>
  
  <p>That way if a Game has a Winner, <code>#complete?</code> will return true. I want to query for all Games that would return false for this method, is there a way to do this with ActiveRecord? Right now in my controller I'm simply calling <code>@games = Game.all</code>, and then in my partial rendering games like:</p>
  
  <pre><code>&lt;% unless game.complete? %&gt;
  yada yada
  &lt;% end %&gt;
  </code></pre>
  
  <p>This seems kind of hacky, and would require me to write a different partial if I want to display "completed" games. Anyway, I was wondering if there is a way in the controller to only assign objects that would return true/false from a model method?</p>