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 . I wanted this the right way or else i make a helper method that returns me the teams for each game, that's not a big problem guys -- Posted via http://www.ruby-forum.com/. -- 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.