habtmとhas_many throw

Railscasts - Two Many-to-Many
より


どっち選択すりゃいいの?
ってなったときは

1.do I need to store extra information in the join?
2.do I need to treat the join like its own model?

if you answer "yes" to any of these, you need a has_many :throw association.
Otherwise you "might" want to use has_and_belongs_to_many.

1.join時に他の情報も格納したいか?
2.join時に自分自身のモデルとして扱いたいか?
どちらかyesなら→has_many_thorow
noなら→habtm