Since has_one
doesn't provide a before_add
callback to allow validation,
how do I prevent rails from destroying the old association even when the
new one does'nt pass validation?
susan :has_one :shirt shirt :belongs_to :susan
susan.shirt = a_nice_shirt
this destroys whatever association was present beforehand, even if the new shirt is never realy associated because it didn't pass validation, leaving a shirtless susan behind (well, acutally leaving a shirt behind that doesn't belong to anyone..).
susan.build_shirt
does the same thing
Is there a good reason for the missing before_add
callback that I overlooked?