Is the only way to destroy an association of a has_one and belongs_to by setting the FK to nil on the belongs_to object?
Doesn't setting @obj1.obj2 = nil work?
But this doesn't delete the belongs_to record. If you want to do it you need to do @obj1.obj2.delete
Since I remenber, once you set drop in cascade, you just have to delete the object and it deletes all dependencies.
Hope this helps, Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With