call the right method in before_validation_on_create

This commit is contained in:
ilya 2010-08-19 10:23:40 -07:00
parent 9e78c9b64c
commit 9b47e67a15

View file

@ -16,7 +16,7 @@ class User
many :groups, :class_name => 'Group' many :groups, :class_name => 'Group'
before_validation_on_create :assign_key before_validation_on_create :setup_person
before_validation :do_bad_things before_validation :do_bad_things
######## Making things work ######## ######## Making things work ########
@ -330,7 +330,7 @@ class User
end end
def setup_person def setup_person
self.person.serialized_key ||= generate_key.export assign_key
self.person.email = email self.person.email = email
self.person.save! self.person.save!
end end