Commit 22ecbe6
committed
Revert introduction of
Mongoid 7.1.0 introduced a regression (see
https://jira.mongodb.org/browse/MONGOID-4849) by switching to the
builtin ruby forwardable method of delegation rather than relying on the
ActiveSupport-provided delegation used before.
mongoid-locker was made compatible with the regressed version of mongoid
in mongodb/mongoid#4739
Mongoid then fixed this regression in 7.1.1+ with
mongodb/mongoid@d078acd,
which goes back to the active support way of delegating.
The `forwardable` inclusion in mongoid-locker causes incompatibilities
when you then include another gem that expects to be able to set up a
delegator within a mongoid document class. For example the
`mongoid-history` gem expects to be able to delegate using the
active-support style here:
https://github.com/mongoid/mongoid-history/blob/c8c4de1235c01252dfbdb9fe6c0abfc078ec1443/lib/mongoid/history/trackable.rb#L24-L25
This PR reverts the change to introduce `forwardable`.
See
mongoid/mongoid-history#238 (comment)
for an example of how this interacts poorly with mongoid-history.forwardable
1 parent 0795445 commit 22ecbe6
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
107 | | - | |
108 | | - | |
109 | 106 | | |
110 | 107 | | |
111 | 108 | | |
| |||
117 | 114 | | |
118 | 115 | | |
119 | 116 | | |
120 | | - | |
| 117 | + | |
121 | 118 | | |
122 | 119 | | |
123 | 120 | | |
| |||
0 commit comments