Logging photo.inspect after save

This commit is contained in:
ilya 2010-07-23 15:37:07 -07:00
parent e754e97c7e
commit bb251e73b3
2 changed files with 6 additions and 1 deletions

View file

@ -22,7 +22,7 @@ class Photo < Post
photo
end
after_save {Rails.logger.info("After saving now the id is #{id}"
after_save :log_inspection
def remote_photo
@remote_photo ||= User.owner.url.chop + image.url

View file

@ -63,6 +63,11 @@ class Post
(self.send accessor.to_sym).to_s}.join ';'
end
def log_inspection prefix
Rails.logger.info prefix
Rails.logger.info self.inspect
end
protected
def destroy_comments
comments.each{|c| c.destroy}