在文件夹中时,activerecord 无法识别正确的 class

activerecord can't recognize the correct class when inside folders

我有当前结构

Module1
  Interactions
  User

Module2
  Interactions
  Person
  User < Person

当我使用 Module1::User.first 从模块 1 加载用户时,用户被正确加载,但是当我尝试从模块 2 (Module2::Person.first) 加载用户时,我得到 Unable to autoload constant User, expected module1/user.rb to define it。我怎样才能让它工作?

编辑:Person 有一个列 type,值为 "User"。性病

刚刚使用 Ignorable gem 解决了。在这种情况下不需要 STI,是遗留数据库