-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
I use Mongoid 3.0.13.
My model is as below
class Foo include Mongoid::Document field :name, type: String, localize: true field :category validates :name, uniqueness: { scope: :category, case_sensitive: false } end
But the uniqueness validation is ignored.
Either without localize or modify the validation to
validates :name, uniqueness: true
, the validation will work. But I need the validation work with scope and localize.
Any suggestion? Thanks.