1 class ChangesetComment < ActiveRecord::Base
3 belongs_to :author, :class_name => "User"
5 validates :id, :uniqueness => true, :presence => { :on => :update },
6 :numericality => { :on => :update, :integer_only => true }
7 validates :changeset, :presence => true, :associated => true
8 validates :author, :presence => true, :associated => true
9 validates :visible, :inclusion => [true, false]
11 # Return the comment text
13 RichText.new("text", self[:body])