Commit 4f082a303a1db57c273b84f5edc6eccac0e6e932
1 parent
b5f55fa8
Exists in
master
and in
29 other branches
ActionItem16: moving uniqueness validation to person
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@884 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
app/models/person.rb
@@ -33,6 +33,7 @@ class Person < Profile | @@ -33,6 +33,7 @@ class Person < Profile | ||
33 | end | 33 | end |
34 | 34 | ||
35 | validates_presence_of :user_id | 35 | validates_presence_of :user_id |
36 | + validates_uniqueness_of :user_id | ||
36 | 37 | ||
37 | def initialize(*args) | 38 | def initialize(*args) |
38 | super(*args) | 39 | super(*args) |