When using "attributes=" for an object with a accepts_nested_attributes_for a model
that has a has_many relationship will cause the has_many array to be appended-to
instead of being replaced as would be expected by a straight assignment operation.
attributes= has always behaved like that ( the name is bad - it's not really an accessor at all. The newer name is assign_attributes)
With nested attributes, you’ll wind up creating new records unless the entries in :posts_attributes have an :id key which indicates they’re existing records to be updated.