Logging for the differing id problem in remote photos

This commit is contained in:
ilya 2010-07-23 15:32:27 -07:00
parent 2f35d07807
commit e754e97c7e

View file

@ -21,14 +21,18 @@ class Photo < Post
photo.image.store! image_file
photo
end
after_save {Rails.logger.info("After saving now the id is #{id}"
def remote_photo
@remote_photo ||= User.owner.url.chop + image.url
end
def remote_photo= remote_path
Rails.logger.info("Setting remote photo with id #{id}")
@remote_photo = remote_path
image.download! remote_path
image.store!
Rails.logger.info("Setting remote photo with id #{id}")
end
end