logging is awesome

This commit is contained in:
Raphael 2010-08-16 13:58:05 -07:00
parent 91b0a1e8f9
commit 1f40ea23b6
2 changed files with 6 additions and 4 deletions

View file

@ -22,10 +22,12 @@ class Comment
validates_presence_of :text
def push_upstream
Rails.logger.info("GOIN UPSTREAM")
push_to([post.person])
end
def push_downstream
Rails.logger.info("SWIMMIN DOWNSTREAM")
push_to(post.people_with_permissions)
end

View file

@ -78,17 +78,17 @@ class Person
def send_comment( c )
if self.remote?
if c.post.person.owner.nil?
#puts "The commenter is not here, and neither is the poster"
Rails.logger.info "The commenter is not here, and neither is the poster"
elsif c.post.person.owner
#puts "The commenter is not here, and the poster is"
Rails.logger.info "The commenter is not here, and the poster is"
c.push_downstream
end
else
if owns? c.post
#puts "The commenter is here, and is the poster"
Rails.logger.info "The commenter is here, and is the poster"
c.push_downstream
else
#puts "The commenter is here, and is not the poster"
Rails.logger.info "The commenter is here, and is not the poster"
c.push_upstream
end
end