2010/1/15 Jon Cox <[email protected]>:
> ooh found 'has_many_and_belongs_to' in ActiveRecord that takes care of
> the match->match_game<-game relationship nicely!

The convention is for the HABTM table name to be alpha ordered and
plural, so in this case it would be games_matches.  Then you will not
have to explicitly name it using :through.

If you have not seen it already you may find the ActiveRecord
Associations guide at http://guides.rubyonrails.org/ useful.  Also the
other guides there of course.

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to