app/models/commontator/comment.rb in commontator-2.0.2 vs app/models/commontator/comment.rb in commontator-4.0.0
- old
+ new
@@ -1,19 +1,15 @@
module Commontator
class Comment < ActiveRecord::Base
belongs_to :creator, :polymorphic => true
belongs_to :editor, :polymorphic => true
-
belongs_to :thread
has_one :commontable, :through => :thread
- attr_accessible :body
-
validates_presence_of :creator, :on => :create
validates_presence_of :editor, :on => :update
-
validates_presence_of :thread
validates_presence_of :body
validates_uniqueness_of :body, :scope => [:creator_type, :creator_id, :thread_id],
:message => 'has already been posted'
@@ -101,8 +97,6 @@
def can_be_voted_on_by?(user)
can_be_voted_on? && thread.can_be_read_by?(user) && user != creator
end
end
-
- CommentObserver.instance
end