Actual implementation of Mongoid::Traversable heavily depends on internals of ActiveSupport, particularly on class_attribute. When Rails changes the implementation in 8.0, our code broke.
For now we vendored some code from ActiveSupport to protect us from further changes. However, we should consider rewriting Mongoid::Traversable to make it more clear an less dependent onActiveSupport internals.