Classy Inheritance: Release 0.4.2
Well, apparently has_one relationships are only automatically saved for new records, not on updates. My bad.
Added in conditional to save a polymorphic depends_on (has_one) relationship if it was an update.
The initial issue was caused by Rails automatically creating the has_one record and then my code was saving the record. That meant two saves, not cool. So, I fixed it assuming Rails would do the maintenance. Wrong.
My bad for not testing further, I'll do my best to avoid this in the future. Rails' bad for a confusing implementation, either save or don't save!
Comments