X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/dbe165bbb3d6eda37d9579f1ac767599f9055607..647a3a7d3951b1bf7ab7034796e44f1cd2541347:/app/models/redaction.rb diff --git a/app/models/redaction.rb b/app/models/redaction.rb index fda59f33b..04f002e36 100644 --- a/app/models/redaction.rb +++ b/app/models/redaction.rb @@ -14,6 +14,9 @@ class Redaction < ActiveRecord::Base has_many :old_ways has_many :old_relations + validates :description, :presence => true + validates :description_format, :inclusion => { :in => %w[text html markdown] } + # this method overrides the AR default to provide the rich # text object for the description field. def description