Update from mongoid 6.4.0 to 8.1: has_many broken? #6048
Replies: 2 comments
-
|
@DcsMarionDickten what error are you seeing? Maybe try removing the leading |
Beta Was this translation helpful? Give feedback.
-
|
There isn't any error. The return value is always an empty array. I tried without the leading ::, no change. (As a matter of fact, at the beginning it was It does seem to have something to do with the fancy scoping because the rest of my app works perfectly. The classes Answers::Participant and Answers::Participation are included in a folder that lives inside vendor: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'll just post the broken code. It worked in Rails 5.2 with Mongoid 6.4 but doesn't in Rails 6.2 with Mongoid 8.1.
Participations snippet:
The has_many has broken when upgrading to Mongoid 7.4 and is still broken in 8.1. I can still get the participations by asking
so it's not too bad although I would like to fix it properly.
Can anybody point me to what is wrong?
Beta Was this translation helpful? Give feedback.
All reactions