We were validating presence wrong: when receiving multiple dimensions to validate at once, we were validating the first, and then quitting.
Models using measured also validate presence via Rails, meaning the same validation is happening twice. This leads to duplicate errors when a validation fails.
Solution
Instead of fixing, we're removing validation logic from the gem, relying on Rails to validating presence. This will also resolve our duplicate error issues.
Review
Basically just deleted a bunch of code (and changed a test to now allow nil value since our models will be responsible for validating that).
Problems
measured
also validate presence via Rails, meaning the same validation is happening twice. This leads to duplicate errors when a validation fails.Solution Instead of fixing, we're removing validation logic from the gem, relying on Rails to validating presence. This will also resolve our duplicate error issues.
Review Basically just deleted a bunch of code (and changed a test to now allow nil value since our models will be responsible for validating that).