clio / polymorphic_integer_type

MIT License
37 stars 35 forks source link

Use sti_name when writing the enum #23

Closed doliveirakn closed 4 years ago

doliveirakn commented 4 years ago

If we cannot find the class with the to_s version of the class name, fall back to using the sti_name of the class which can be different.

We already use the sti_name to lookup the class mapping in the remove_type_and_estbalish_mapping method so this isn't a new concept to the gym.

We will keep the base_class.to_s to keep some backwards compatibility with the previous version.