1 class ChangesetComment < ActiveRecord::Base
3 belongs_to :author, :class_name => "User"
5 validates_presence_of :id, :on => :update # is it necessary?
6 validates_uniqueness_of :id
7 validates_presence_of :changeset
8 validates_associated :changeset
9 validates_presence_of :author
10 validates_associated :author
11 validates :visible, :inclusion => { :in => [true,false] }
13 # Return the comment text
15 RichText.new("text", read_attribute(:body))