Instead of just initializing a new class that inherits from the parent class, we are initializing a new class but also overriding some method definitions. That is necessary because the Rails guides recommend that whenever you have a polymorphic association and STI you should override the ..._type column to use the type name of the base STI class.
Instead of just initializing a new class that inherits from the parent class, we are initializing a new class but also overriding some method definitions. That is necessary because the Rails guides recommend that whenever you have a polymorphic association and STI you should override the
..._type
column to use the type name of the base STI class.https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#module-ActiveRecord::Associations::ClassMethods-label-Polymorphic+Associations
This should fix #1622