call the right method in before_validation_on_create
This commit is contained in:
parent
9e78c9b64c
commit
9b47e67a15
1 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ class User
|
|||
|
||||
many :groups, :class_name => 'Group'
|
||||
|
||||
before_validation_on_create :assign_key
|
||||
before_validation_on_create :setup_person
|
||||
before_validation :do_bad_things
|
||||
|
||||
######## Making things work ########
|
||||
|
|
@ -330,7 +330,7 @@ class User
|
|||
end
|
||||
|
||||
def setup_person
|
||||
self.person.serialized_key ||= generate_key.export
|
||||
assign_key
|
||||
self.person.email = email
|
||||
self.person.save!
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue