Difference between has_one and belongs_to in Rails? [duplicate]
No, they are not interchangable, and there are some real differences. belongs_to means that the foreign key is in the table for this class. So belongs_to can ONLY go in the class that holds the foreign key. has_one means that there is a foreign key in another table that references this class. So has_one can … Read more