>
> > 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
>

That'll do me...

This is only a site for about 30-40 friends, so I'm not too bothered about
efficiency.

Cheers,


Andy

-- 
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