opts[:person] set to empty hash only if not already defined. same with opts[:person][:profile]. rake db:reset works properly again.
This commit is contained in:
parent
1d5b7a87f1
commit
59858cd86b
1 changed files with 2 additions and 2 deletions
|
|
@ -407,14 +407,14 @@ class User
|
|||
|
||||
###Helpers############
|
||||
def self.build(opts = {})
|
||||
opts[:person] = {}
|
||||
opts[:person] ||= {}
|
||||
opts[:person][:profile] ||= Profile.new
|
||||
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{APP_CONFIG[:terse_pod_url]}"
|
||||
opts[:person][:url] = APP_CONFIG[:pod_url]
|
||||
|
||||
opts[:serialized_private_key] = generate_key
|
||||
opts[:person][:serialized_public_key] = opts[:serialized_private_key].public_key
|
||||
|
||||
opts[:person][:profile] = Profile.new
|
||||
|
||||
u = User.new(opts)
|
||||
u
|
||||
|
|
|
|||
Loading…
Reference in a new issue