The class level map using @@__types messes up the autoloading when STI classes are present. The Registry.all.detect lookup should be very fast so this seems to be a good trade off to fix the old STI auto load issue that was reported in #838 and closed by the stalebot.
Related PR #888 was also closed with a statement that STI support is deprecated and removed from the gem. It is my opinion that this PR and #888 is a fix related to Rails autoloading and has nothing to do with STI support.
Please consider this PR to close #848 for good. Thanks!
The class level map using @@__types messes up the autoloading when STI classes are present. The Registry.all.detect lookup should be very fast so this seems to be a good trade off to fix the old STI auto load issue that was reported in #838 and closed by the stalebot.
Related PR #888 was also closed with a statement that STI support is deprecated and removed from the gem. It is my opinion that this PR and #888 is a fix related to Rails autoloading and has nothing to do with STI support.
Please consider this PR to close #848 for good. Thanks!