On Tue, Apr 20, 2010 at 2:19 PM, Andy Jeffries <a...@andyjeffries.co.uk> wrote:
> Having a bit of a braindead day, can anyone help with this.  I have three
> models: Player, Game, Prediction (Player has_many :games, :through =>
> :prediction)
> I want a named_scope that finds games that the current player hasn't already
> predicted.

How about tackling it from the Player model like this

def unpredicted_games
  Game.all - self.games
end

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to