RS, IZ; removed url from user and views
This commit is contained in:
parent
efd901dcd9
commit
d26e7850ac
4 changed files with 4 additions and 8 deletions
|
|
@ -25,8 +25,6 @@ class User
|
||||||
key :visible_post_ids, Array
|
key :visible_post_ids, Array
|
||||||
key :visible_person_ids, Array
|
key :visible_person_ids, Array
|
||||||
|
|
||||||
key :url, String
|
|
||||||
|
|
||||||
one :person, :class_name => 'Person', :foreign_key => :owner_id
|
one :person, :class_name => 'Person', :foreign_key => :owner_id
|
||||||
|
|
||||||
many :friends, :in => :friend_ids, :class_name => 'Person'
|
many :friends, :in => :friend_ids, :class_name => 'Person'
|
||||||
|
|
@ -224,6 +222,7 @@ class User
|
||||||
###Helpers############
|
###Helpers############
|
||||||
def self.instantiate!( opts = {} )
|
def self.instantiate!( opts = {} )
|
||||||
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{terse_url}"
|
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{terse_url}"
|
||||||
|
opts[:person][:url] = APP_CONFIG[:pod_url]
|
||||||
opts[:person][:serialized_key] = generate_key
|
opts[:person][:serialized_key] = generate_key
|
||||||
User.create(opts)
|
User.create(opts)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
= f.label :username
|
= f.label :username
|
||||||
= f.text_field :username
|
= f.text_field :username
|
||||||
%p.user_network
|
%p.user_network
|
||||||
="@#{request.host}"
|
="@#{APP_CONFIG[:pod_url]}"
|
||||||
|
|
||||||
%p
|
%p
|
||||||
= f.label :password
|
= f.label :password
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
|
|
||||||
= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
|
= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
|
||||||
= f.hidden_field :url, :value => request.host
|
|
||||||
%p
|
%p
|
||||||
= f.label :username
|
= f.label :username
|
||||||
= f.text_field :username
|
= f.text_field :username
|
||||||
|
|
@ -17,8 +16,6 @@
|
||||||
= f.password_field :password_confirmation
|
= f.password_field :password_confirmation
|
||||||
|
|
||||||
= f.fields_for :person do |p|
|
= f.fields_for :person do |p|
|
||||||
= p.hidden_field :url, :value => request.host
|
|
||||||
|
|
||||||
= p.fields_for :profile do |pr|
|
= p.fields_for :profile do |pr|
|
||||||
%p
|
%p
|
||||||
= pr.label :first_name
|
= pr.label :first_name
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@
|
||||||
|
|
||||||
%h3 Picture
|
%h3 Picture
|
||||||
%div#image_picker
|
%div#image_picker
|
||||||
= p.hidden_field :image_url, :value => (@profile.image_url.sub(@user.url,'/') if @profile.image_url), :id => 'image_url_field'
|
= p.hidden_field :image_url, :value => (@profile.image_url.sub(APP_CONFIG[:pod_url],'/') if @profile.image_url), :id => 'image_url_field'
|
||||||
|
|
||||||
- unless @photos.nil? || @photos.empty?
|
- unless @photos.nil? || @photos.empty?
|
||||||
- for photo in @photos
|
- for photo in @photos
|
||||||
- if @profile.image_url && (photo.url(:thumb_medium) == @profile.image_url.sub(@user.url,'/'))
|
- if @profile.image_url && (photo.url(:thumb_medium) == @profile.image_url.sub(APP_CONFIG[:pod_url],'/'))
|
||||||
%div.small_photo{:id => photo.url(:thumb_medium), :class=>'selected'}
|
%div.small_photo{:id => photo.url(:thumb_medium), :class=>'selected'}
|
||||||
= check_box_tag 'checked_photo', true, true
|
= check_box_tag 'checked_photo', true, true
|
||||||
= link_to image_tag(photo.url(:thumb_medium)), "#"
|
= link_to image_tag(photo.url(:thumb_medium)), "#"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue