seed aspects on user create
This commit is contained in:
parent
16625f4ee9
commit
b2b2748fea
1 changed files with 6 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ class User
|
||||||
|
|
||||||
|
|
||||||
after_create :setup_person
|
after_create :setup_person
|
||||||
|
after_create :seed_aspects
|
||||||
|
|
||||||
before_validation :do_bad_things
|
before_validation :do_bad_things
|
||||||
before_save :downcase_username
|
before_save :downcase_username
|
||||||
|
|
@ -292,6 +293,11 @@ class User
|
||||||
opts[:person][:serialized_key] = generate_key
|
opts[:person][:serialized_key] = generate_key
|
||||||
User.create!(opts)
|
User.create!(opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def seed_aspects
|
||||||
|
aspect(:name => "Family")
|
||||||
|
aspect(:name => "Work")
|
||||||
|
end
|
||||||
|
|
||||||
def self.create(opts ={})
|
def self.create(opts ={})
|
||||||
puts opts.inspect
|
puts opts.inspect
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue