Replies: 1 comment 17 replies
-
My recommendation as a long time Mongoid user is to stay on Mongoid 7.x. |
Beta Was this translation helpful? Give feedback.
17 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm upgrading Rails app from mongoid 7.5 to 8.1.1. I had validations like:
When using 7.5 and I pass e.g. string 'foo' validation does not pass as expected. But in mongoid 8.1.1 as I'v found when passing string and it's not a number it's casted to number, if cast can not be done it's silently converted to nil. So now my validation passes when it should not. I'v refactored it that way:
It works as expected now but I want to make sure are there any drawbacks/dangers in that approach?
Beta Was this translation helpful? Give feedback.
All reactions