Now that rails includes a #polymorphic_name method which returns the class name including namespaces, we need to add some fallbacks in case we didn't include namespaces in our original type_mappings.
If they don't we can fall back to other methods like #sti_name, base_class#to_s,
or base_class#sti_name until we get a hit
Now that rails includes a
#polymorphic_name
method which returns the class name including namespaces, we need to add some fallbacks in case we didn't include namespaces in our original type_mappings.If they don't we can fall back to other methods like
#sti_name
,base_class#to_s
, orbase_class#sti_name
until we get a hit[x] confirmed specs pass under 5.1.7
[x] confirmed specs pass under 5.2.4.4