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############
|
###Helpers############
|
||||||
def self.instantiate!( opts = {} )
|
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
|
opts[:person][:serialized_key] = generate_key
|
||||||
User.create!(opts)
|
User.create(opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
def seed_aspects
|
def seed_aspects
|
||||||
|
|
@ -296,10 +300,6 @@ class User
|
||||||
aspect(:name => "Work")
|
aspect(:name => "Work")
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create(opts ={})
|
|
||||||
puts opts.inspect
|
|
||||||
end
|
|
||||||
|
|
||||||
def terse_url
|
def terse_url
|
||||||
terse = self.url.gsub(/(https?:|www\.)\/\//, '')
|
terse = self.url.gsub(/(https?:|www\.)\/\//, '')
|
||||||
terse = terse.chop! if terse[-1, 1] == '/'
|
terse = terse.chop! if terse[-1, 1] == '/'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue