MS fixed the nil hostname on user
This commit is contained in:
parent
1d616f001a
commit
6f867d60c4
1 changed files with 6 additions and 6 deletions
|
|
@ -286,9 +286,13 @@ class User
|
|||
|
||||
###Helpers############
|
||||
def self.instantiate!( opts = {} )
|
||||
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{URI::parse(opts[:url]).host}"
|
||||
hostname = opts[:url].gsub(/(https?:|www\.)\/\//, '')
|
||||
hostname.chop! if hostname[-1, 1] == '/'
|
||||
|
||||
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{hostname}"
|
||||
puts opts[:person][:diaspora_handle]
|
||||
opts[:person][:serialized_key] = generate_key
|
||||
User.create!(opts)
|
||||
User.create(opts)
|
||||
end
|
||||
|
||||
def seed_aspects
|
||||
|
|
@ -296,10 +300,6 @@ class User
|
|||
aspect(:name => "Work")
|
||||
end
|
||||
|
||||
def self.create(opts ={})
|
||||
puts opts.inspect
|
||||
end
|
||||
|
||||
def terse_url
|
||||
terse = self.url.gsub(/(https?:|www\.)\/\//, '')
|
||||
terse = terse.chop! if terse[-1, 1] == '/'
|
||||
|
|
|
|||
Loading…
Reference in a new issue