]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/redaction.rb
Add extra tests for API and redaction controllers
[rails.git] / app / models / redaction.rb
index fda59f33bcd10e5098af8d210faf5f11715237e0..49de3177a127af1a0bbe260aaf1feaa15b716109 100644 (file)
@@ -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