Logging for the differing id problem in remote photos
This commit is contained in:
parent
2f35d07807
commit
e754e97c7e
1 changed files with 4 additions and 0 deletions
|
|
@ -22,13 +22,17 @@ class Photo < Post
|
||||||
photo
|
photo
|
||||||
end
|
end
|
||||||
|
|
||||||
|
after_save {Rails.logger.info("After saving now the id is #{id}"
|
||||||
|
|
||||||
def remote_photo
|
def remote_photo
|
||||||
@remote_photo ||= User.owner.url.chop + image.url
|
@remote_photo ||= User.owner.url.chop + image.url
|
||||||
end
|
end
|
||||||
|
|
||||||
def remote_photo= remote_path
|
def remote_photo= remote_path
|
||||||
|
Rails.logger.info("Setting remote photo with id #{id}")
|
||||||
@remote_photo = remote_path
|
@remote_photo = remote_path
|
||||||
image.download! remote_path
|
image.download! remote_path
|
||||||
image.store!
|
image.store!
|
||||||
|
Rails.logger.info("Setting remote photo with id #{id}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue