2 # Redaction represents a record associated with a particular
3 # action on the database to hide revisions from the history
4 # which are not appropriate to redistribute any more.
6 # The circumstances of the redaction can be recorded in the
7 # record's title and description fields, which can be
8 # displayed linked from the redacted records.
10 class Redaction < ActiveRecord::Base
15 has_many :old_relations
17 validates :description, :presence => true
18 validates :description_format, :inclusion => { :in => %w(text html markdown) }
20 # this method overrides the AR default to provide the rich
21 # text object for the description field.
23 RichText.new(self[:description_format], self[:description])