X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/305593a7049eb3183e0adcf2a0398dcf71461abc..c0e4394a486002a3d4283200a8a1ed20c0f134f8:/app/models/redaction.rb?ds=sidebyside diff --git a/app/models/redaction.rb b/app/models/redaction.rb index fda59f33b..49de3177a 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