Atelier Fabien
2005-Dec-14 08:33 UTC
validate_uniqueness_of builds queries with IS NULL when value is nil (since RC 5)
Hi people, Ever since RC 5 (including 1.0) my unit tests that test for inserting duplicate entries fail and throw errors. Each of them implements validate_uniqueness_of to prevent duplicates. While I also put in a ticket for this, I''m wondering if this is actually a defect or maybe intended behaviour afterall. If so, I won''t apply the patch again and look for another solution. http://dev.rubyonrails.org/ticket/3143 Tell me, should I patch it? ;-) Thanks, Fabien
Possibly Parallel Threads
- Case sensitive validate_uniqueness_of isn't working
- Allow blank on should validate_uniqueness_of
- validate_uniqueness_of {combination of fields} ???
- How to validate_uniqueness_of the joint of two attributes?
- validates_uniqueness_of - how to use multiple values for scope