]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/redaction.rb
Merge remote-tracking branch 'upstream/pull/2431'
[rails.git] / app / models / redaction.rb
index d9a5c6cd793091fd893facd7b8130c1af2bc2473..f4eedde0a2daddb172843d910507494261c1b4ae 100644 (file)
 # 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