From eb793ea129003f1984b23733888f3b7f722b76c3 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 16 Aug 2010 11:07:18 -0700 Subject: [PATCH] Took out a couple more references to User.owner --- app/models/photo.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/photo.rb b/app/models/photo.rb index c06ceb62c..d93a1189a 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -37,7 +37,7 @@ class Photo < Post end def remote_photo - @remote_photo ||= User.owner.url.chop + image.url + @remote_photo ||= self.person.url.chop + image.url end def remote_photo= remote_path @@ -47,10 +47,10 @@ class Photo < Post end def ensure_user_picture - user = User.owner - if user.profile.image_url == image.url(:thumb_medium) + users = Person.all('profile.image_url' => image.url(:thumb_medium) ) + users.each{ |user| user.profile.update_attributes!(:image_url => nil) - end + } end def thumb_hash