This is my take on it:
OLD WAY - has_and_belongs_to_many :my_model
This is an out of date technique to set up the many-to-many table. A
major limitation to this method is that you cannot have any more fields
in the table then the 2 joining fields, and the join table does not use
a primary field key called 'id'. You can't sort joined fields very
easily with this method.
This makes it sound like HABTM is obsolete. It isn't if you don't
need to have attributes on the association, I think it serves
This technique is very easy to set up. The table name is the plural
names of the 2 joining tables, in alphabetical order, separated by an
underscore. Table C and B would be BS_CS. The only 2 fields in the join
table would be b_id and c_id.
And if the too records were foo and bar, the join table would be
bars_foos, not foos_bars as has been mistakenly said at least once in
On the other hand, the link in the original post was to a description
of :has_many :through and I think that the OP was confused between
examples of HABTM and HM T.