-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
I thought model.save is supposed to return false if there are errors in the validation. However, I just noticed that Mongoid 3 is returning true regardless of errors.
I have this validation in my model:
validates_uniqueness_of :_external_id, :scope => [:fanforce_id, :ff_action_id]
which is returning the following error when I try to add a new record with a duplicate _external_id:
{"_external_id":["is already taken"]}but model.save is returning true.