Say I have two classes: Supplier, and Account. These classes are connected via has_one and belongs_to.
I create a new instance of each.
s = Supplier.new
a = Account.new
I then set one of the associations
s.account = a
Does a.supplier automatically get set?
I’ve tried this and i’m getting a.supplier == nil. I assume I’m doing something wrong but…
You just need to reload the a instance:
a.reload, ora.supplier(true)