def define_relation_touch_method(name, association)
      relation_classes = if association.polymorphic?
                           association.send(:inverse_association_classes)
                         else
                           [ association.relation_class ]
                         end

      relation_classes.each { |c| c.send(:include, InstanceMethods) }
      method_name = "touch_#{name}_after_create_or_destroy"
      association.inverse_class.class_eval <<-TOUCH, __FILE__, __LINE__ + 1
          def #{method_name}
            without_autobuild do
              relation = __send__(:#{name})
              relation.touch #{":#{association.touch_field}" if association.touch_field} if relation
            end
          end
      TOUCH
      method_name.to_sym
    end
def define_relation_touch_method(name, association)
      relation_classes = if association.polymorphic?
                           association.send(:inverse_association_classes)
                         else
                           [ association.relation_class ]
                         end

      relation_classes.each { |c| c.send(:include, InstanceMethods) }
      method_name = "touch_#{name}_after_create_or_destroy"
      association.inverse_class.class_eval <<-TOUCH, __FILE__, __LINE__ + 1
          def #{method_name}
            without_autobuild do
              relation = __send__(:#{name})
              relation.touch #{":#{association.touch_field}" if association.touch_field} if relation
            end
          end
      TOUCH
      method_name.to_sym
    end
Define the method that will get called for touching belongs_to
 associations.

 @api private

 @example Define the touch association.
   Model.define_relation_touch_method(:band)
   Model.define_relation_touch_method(:band, :band_updated_at)

 @param [ Symbol ] name The name of the association.
 @param [ Association ] association The association metadata.

 @since 3.1.0

 @return [ Symbol ] The method name.