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 photo
end end
after_save {Rails.logger.info("After saving now the id is #{id}" after_save :log_inspection
def remote_photo def remote_photo
@remote_photo ||= User.owner.url.chop + image.url @remote_photo ||= User.owner.url.chop + image.url

View file

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