DG IZ profile profile photos should update, removed the scaled down hack

This commit is contained in:
ilya 2010-07-29 19:44:58 -07:00
parent abc5ee412d
commit f191aef981
3 changed files with 3 additions and 23 deletions

View file

@ -34,7 +34,7 @@ class Photo < Post
end
def remote_photo
@remote_photo ||= User.owner.url.chop + image.url(:scaled_full)
@remote_photo ||= User.owner.url.chop + image.url
end
def remote_photo= remote_path

View file

@ -16,14 +16,6 @@ class Profile
validates_presence_of :first_name, :last_name
# before_save :expand_profile_photo_path
#
#
# def expand_profile_photo_path
# unless image_url.nil? || self.image_url.include?(parent_document.url)
# self.image_url = self._parent_document.url + self.image_url
# end
# end
def person_id
self._parent_document.id
end

View file

@ -30,14 +30,7 @@ module Diaspora
person.profile = object
person.save
end
objects << object
#elsif object.is_a? Profile
# person = parse_owner_id_from_xml post
# profile_hash = Hash.from_xml(post.to_s)
# person.profile.update_attributes!(profile_hash)
#else
# object << object
#end
objects << object
rescue
Rails.logger.info "Not a real type: #{object.to_s}"
end
@ -53,16 +46,11 @@ module Diaspora
p.perform
elsif p.is_a? Request
User.owner.receive_friend_request(p)
#This line checks if the sender was in the database, among other things?
elsif p.is_a? Profile
puts p.person_id
p.save
elsif p.respond_to?(:person) && !(p.person.nil?) && !(p.person.is_a? User) #WTF
elsif p.respond_to?(:person) && !(p.person.nil?) && !(p.person.is_a? User)
Rails.logger.info("Saving object with success: #{p.save}")
end
#p.save if p.respond_to?(:person) && !(p.person == nil) #WTF
end
end
end