def assign_to_or_mark_for_destruction(record, attributes)
      record.assign_attributes(attributes.except(*UNASSIGNABLE_KEYS))
      record.mark_for_destruction if destroy_flag?(attributes)
    end
def assign_to_or_mark_for_destruction(record, attributes)
      record.assign_attributes(attributes.except(*UNASSIGNABLE_KEYS))
      record.mark_for_destruction if destroy_flag?(attributes)
    end
Updates an object with attributes or marks it for destruction if has_destroy_flag?.