def assign_to_or_mark_for_destruction(record, attributes, allow_destroy, assignment_opts)
      record.assign_attributes(attributes.except(*unassignable_keys(assignment_opts)), assignment_opts)
      record.mark_for_destruction if has_destroy_flag?(attributes) && allow_destroy
    end
def assign_to_or_mark_for_destruction(record, attributes, allow_destroy, assignment_opts)
      record.assign_attributes(attributes.except(*unassignable_keys(assignment_opts)), assignment_opts)
      record.mark_for_destruction if has_destroy_flag?(attributes) && allow_destroy
    end
Updates a record with the +attributes+ or marks it for destruction if
 +allow_destroy+ is +true+ and has_destroy_flag? returns +true+.