Took out a couple more references to User.owner
This commit is contained in:
parent
3efa36587a
commit
eb793ea129
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue