Affects Version/s: None
Fix Version/s: 12_01_17
validates_uniqueness does not work when it's set in an embedded document. Let's say I want all report names to be unique (system-wide):
embedded_in :user, :inverse_of => :report
With the following spec:
report = Report.make(:name => "x")
Report.make_unsaved(:name => "x").should_not be_valid # Error, it is valid!
I'm not sure this is a bug, it might very well be I'm doing something wrong here. But, maybe it is a bug.