From 598c646b07dfefdf4971d3b0137a2b1ad2e83fae Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 16 Aug 2010 12:56:02 -0700 Subject: [PATCH] Hack to get comments working for now --- app/models/person.rb | 29 ++++++++++++++--------------- app/models/user.rb | 1 + 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/models/person.rb b/app/models/person.rb index 50a3cc410..827d4945d 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -77,22 +77,21 @@ class Person def send_comment( c ) if self.owner.nil? - if c.post.person.owner.nil? - #puts "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" - c.push_downstream - end - else - if owns? c.post - #puts "The commenter is here, and is the poster" - c.push_downstream - else - #puts "The commenter is here, and is not the poster" - c.push_upstream - end + if c.post.person.owner.nil? + #puts "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" + c.push_downstream end - + else + if owns? c.post + #puts "The commenter is here, and is the poster" + c.push_downstream + else + #puts "The commenter is here, and is not the poster" + c.push_upstream + end + end end ##profile def update_profile(params) diff --git a/app/models/user.rb b/app/models/user.rb index d224cef44..e35ec88cb 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -174,6 +174,7 @@ class User Rails.logger.debug("Saving object: #{object}") object.save object.socket_to_uid( id) if object.respond_to? :socket_to_uid + object.person.send_comment object if object.is_a? Comment end end