elastic / elasticsearch-rails

Elasticsearch integrations for ActiveModel/Record and Ruby on Rails
Apache License 2.0
3.07k stars 793 forks source link

Addressing #838, STI issues when code is reloaded in development, fix… #1064

Open vanboom opened 10 months ago

vanboom commented 10 months ago

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!

cla-checker-service[bot] commented 10 months ago

💚 CLA has been signed