Belongs_to association with primary key and foreign key
when you have matching associations, the foreign_key
and primary_key
for those associations are the same. so just swap the foreign_key
and primary_key
in the belongs_to
association.
when you have matching associations, the foreign_key
and primary_key
for those associations are the same. so just swap the foreign_key
and primary_key
in the belongs_to
association.