-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.1.0
-
Component/s: None
-
None
Starting with version 7.1.0, MongoID models can no longer utilize Rails' delegate method. Attempting to call the method results in an ArgumentError.
I inspected this issue a little further and it turned out that delegate no longer refers to the Rails' method but to Ruby's built-in Forwardable module.
Rails' Module#delegate and Ruby's Forwardable#delegate have different semantics and cannot be used interchangeably.
If I'm not mistaken, this is due to https://github.com/mongodb/mongoid/commit/3cfabfd2e41c8e3738aa6e381b9113d89275f2f5 which added the Forwardable module to MongoID.
- duplicates
-
MONGOID-4849 ActiveSupport delegation no longer works with 7.1.0 (conflicts with Forwardable.delegate)
- Closed