def record_changed?(reflection, record, key)
        record.new_record? ||
          association_foreign_key_changed?(reflection, record, key) ||
          record.will_save_change_to_attribute?(reflection.foreign_key)
      end
def record_changed?(reflection, record, key)
        record.new_record? ||
          association_foreign_key_changed?(reflection, record, key) ||
          record.will_save_change_to_attribute?(reflection.foreign_key)
      end
If the record is new or it has changed, returns true.