we need do bad things in the user for seeding the database

This commit is contained in:
ilya 2010-08-18 21:42:37 -07:00
parent 7ce8f94d58
commit 0c9f041f28

View file

@ -16,6 +16,7 @@ class User
many :groups, :class_name => 'Group'
before_validation :do_bad_things
after_validation_on_create :setup_person
######## Making things work ########
@ -303,6 +304,10 @@ class User
terse
end
def do_bad_things
self.password_confirmation = self.password
end
def visible_person_by_id( id )
id = ensure_bson id
return self.person if id == self.person.id