def register_type(*args)
      if types_list.respond_to?(:add)
        types_list.add self, *args
      else
        types_list << self
      end
      if types_tracker_base.respond_to?(:scope) &&
          !types_tracker_base.respond_to?(model_name.element)
        type_name = name
        types_tracker_base.scope model_name.element, -> { where(type: type_name) }
      end
    end
def register_type(*args)
      if types_list.respond_to?(:add)
        types_list.add self, *args
      else
        types_list << self
      end
      if types_tracker_base.respond_to?(:scope) &&
          !types_tracker_base.respond_to?(model_name.element)
        type_name = name
        types_tracker_base.scope model_name.element, -> { where(type: type_name) }
      end
    end
Add `self` to `types_list`. Defines scope for ActiveRecord models.