+ validates :id, :uniqueness => true, :presence => { :on => :update },
+ :numericality => { :on => :update, :only_integer => true }
+ validates :note, :associated => true
+ validates :visible, :inclusion => [true, false]
+ validates :author, :associated => true
+ validates :event, :inclusion => %w[opened closed reopened commented hidden]
+ validates :body, :length => { :maximum => 2000 }, :characters => true
+
+ # Return the comment text
+ def body
+ RichText.new("text", self[:body])