Let’s say I have:
A BELONGS_TO B
B HAS_ONE A (with :dependent=>:nullify)
But this association does not need to exist. In other words, I could
have many A’s and B’s that are not associated in this manner.
Presently, if I try to delete “B”:
- If B is associated to an “A”, this works fine and A.my_B is
- If B is NOT associated, I get an error saying it is trying to call
“nil.update_attribute” (presumably trying to set the my_B to nil.)
Seems to me this is a bug – if my_B is already nil, nothing should
happen; Rails should just happily delete B.