Created
June 8, 2009 05:49
-
-
Save whoahbot/125651 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/dm-validations/lib/dm-validations/validators/uniqueness_validator.rb b/dm-validations/lib/dm-validations/validators/uniquen | |
| index 16fc786..6bec021 100644 | |
| --- a/dm-validations/lib/dm-validations/validators/uniqueness_validator.rb | |
| +++ b/dm-validations/lib/dm-validations/validators/uniqueness_validator.rb | |
| @@ -22,8 +22,11 @@ module DataMapper | |
| repository_name = target.repository.name | |
| + fields = target.model.key.dup | |
| + fields << target.model.properties[field_name] | |
| + | |
| opts = { | |
| - :fields => target.model.key, | |
| + :fields => fields, | |
| field_name => target.validation_property_value(field_name), | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment