Hi, you might want to replace the “belongs_to” with “has_one”.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Why is my model relationship fails? (has_one and belongs_to) | 0 | 111 | November 16, 2010 | |
belongs_to association doesn't work with _id set | 0 | 80 | October 8, 2007 | |
(ActiveRecord) Why is there no "belongs_to_many"? | 25 | 636 | November 21, 2011 | |
multiple belongs_to a single model | 2 | 163 | April 7, 2008 | |
Had to remove a belongs_to for a hack to fix record must exist error | 2 | 424 | August 20, 2023 |