<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -12,6 +12,7 @@ Edge
 * using acts_as_rateable and acts_as_shareable as plugins, which fixes problem with timestamps while installing
 * using acts_as_taggable_on instead of acts_as_taggable_on_steroids_
 * comments can be posted to twitter (kudos to boonious)
+* for comments notification, commentable must respond to user or owner (till now must respond to owner)
 
 0.5.4
 ----</diff>
      <filename>CHANGELOG.md</filename>
    </modified>
    <modified>
      <diff>@@ -4,8 +4,8 @@ class CommentsController &lt; ApplicationController
     commentable = Comment.find_commentable params[:comment][:commentable_type], params[:comment][:commentable_id]
 
     @comment = commentable.comments.new(params[:comment])
-    @comment.user_id = current_user.id if !current_user.nil?
-    @comment.approved = !commentable.respond_to?(&quot;moderated&quot;) || !commentable.moderated || commentable.owner == current_user
+    @comment.user_id = current_user.id unless current_user.nil?
+    @comment.approved = !commentable.respond_to?(&quot;moderated&quot;) || !commentable.moderated || commentable.commentable_owner == current_user
 
     @comment.spam = Cerberus.check_spam(@comment, request)
     </diff>
      <filename>app/controllers/comments_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,10 +29,10 @@ class Comment &lt; ActiveRecord::Base
     end
   end
   def commentable_owner
-    commentable.owner if commentable 
+    commentable.respond_to?(&quot;owner&quot;) ? commentable.owner : commentable.user
   end
   def commentable_owner_email
-    commentable.owner.email if commentable &amp;&amp; commentable.owner
+    commentable_owner.email if commentable &amp;&amp; commentable_owner
   end
   def commentable_title
     commentable.title_for_comment</diff>
      <filename>lib/comment.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7de59ed8e0342b28c9ad28d7668726e6fa0ab2f4</id>
    </parent>
  </parents>
  <author>
    <name>molpe</name>
    <email>alberto.molpeceres@gmail.com</email>
  </author>
  <url>http://github.com/tog/tog_core/commit/dffb90bedbee3d8d8b088287f9dcb647aff24c6d</url>
  <id>dffb90bedbee3d8d8b088287f9dcb647aff24c6d</id>
  <committed-date>2009-11-02T02:15:00-08:00</committed-date>
  <authored-date>2009-11-02T02:15:00-08:00</authored-date>
  <message>small fix and improvement in comment's notification</message>
  <tree>df9dc0ac04f988c4e0193c3efefdb251e8dfa022</tree>
  <committer>
    <name>molpe</name>
    <email>alberto.molpeceres@gmail.com</email>
  </committer>
</commit>
