X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c2f23fea6a7821a4ad4c97fd65744b138ec86267..7b5f590a2d6f6ed253b595d4e3a27ca18289e5ce:/app/models/redaction.rb?ds=sidebyside diff --git a/app/models/redaction.rb b/app/models/redaction.rb index d9a5c6cd7..f4eedde0a 100644 --- a/app/models/redaction.rb +++ b/app/models/redaction.rb @@ -24,15 +24,15 @@ # record's title and description fields, which can be # displayed linked from the redacted records. # -class Redaction < ActiveRecord::Base +class Redaction < ApplicationRecord belongs_to :user has_many :old_nodes has_many :old_ways has_many :old_relations - validates :title, :description, :invalid_chars => true - validates :description, :presence => true + validates :title, :presence => true, :characters => true + validates :description, :presence => true, :characters => true validates :description_format, :inclusion => { :in => %w[text html markdown] } # this method overrides the AR default to provide the rich