fixed has many through join when the relation is a belong_to b belong_to c.
current code expect a has_many b belong_to c.