On 25 September 2010 12:29, Helder Oliveira <li...@ruby-forum.com> wrote:
> clanlaw wrote:
>> On 24 September 2010 23:56, radhames brito <rbri...@gmail.com> wrote:
>>> class Game < ActiveRecor::Base
>>> has_many� :teams
>>>
>>>
>>> class Team < ActiveRecor::Base
>>> belongs_to :game
>>
>> That will only allow a team to be involved in one game, is that is
>> what is required?
>>
>> Colin
>
> brito yes i notices the typo.
>
> colin, one game has two teams, team1_id and team2_id .

Yes, my question was how many games can a team be involved with.
Radhames' suggestion would only allow each team to be involved in one
game.

Colin

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