def assign_to_or_mark_for_destruction(record, *args)
      name = association_name(record)

      if self.class.reflect_on_association(name).collection? &&
      versioned_attribute?(name)
        previous = changed_attributes[name]

        # Assume it will change. It may not. We'll handle that scenario
        # after the attributes have been assigned.
        send("#{name}_will_change!")
        super(record, *args)

        reset_changes_if_unchanged(record, name, previous)
      else
        super(record, *args)
      end
    end
def assign_to_or_mark_for_destruction(record, *args)
      name = association_name(record)

      if self.class.reflect_on_association(name).collection? &&
      versioned_attribute?(name)
        previous = changed_attributes[name]

        # Assume it will change. It may not. We'll handle that scenario
        # after the attributes have been assigned.
        send("#{name}_will_change!")
        super(record, *args)

        reset_changes_if_unchanged(record, name, previous)
      else
        super(record, *args)
      end
    end
For association_attributes=
 Should we conditionally include this method? I would like to,
 but if we're checking if this model accepts nested attributes
 for the association, then accepts_nested_attributes_for would
 have to be declared *before* tracks_association, which is too
 strict for my tastes.