Why is default_session removed from the releases?
#5507
-
|
I have a project to upgrade a rails app (rails 4.2) using mongoid 4. In upgrading to mongoid 6 I am getting a slew of errors I saw that it was removed in this commit but haven't seen documentation on why and what else should be used. I'm concerned about the compatibility since I don't see a list of deprecations. Any advice on how to move forward? I'm not sure if I'm supposed to use a different gem or if this application is stuck using mongoid 4. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Looking through that commit I was able to swap Mongoid.default_session.with(read: :primary)
# to
Mongoid.default_client.with({ read: { mode: :primary } }) |
Beta Was this translation helpful? Give feedback.
Looking through that commit I was able to swap
default_sessionour withdefault_client. Then update the parameters called todefault_client.withto a nested hash structure.