]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/redaction.rb
Merge remote-tracking branch 'upstream/pull/4827'
[rails.git] / app / models / redaction.rb
index e99460c3b9860e6426ca2544adc2cd1889d011d2..5e9e0decde935a87b1514e3a8ffec16085026b79 100644 (file)
@@ -3,11 +3,11 @@
 # Table name: redactions
 #
 #  id                 :integer          not null, primary key
-#  title              :string
-#  description        :text
+#  title              :string           not null
+#  description        :text             not null
 #  created_at         :datetime
 #  updated_at         :datetime
-#  user_id            :integer          not null
+#  user_id            :bigint(8)        not null
 #  description_format :enum             default("markdown"), not null
 #
 # Foreign Keys
 # 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, :presence => true, :invalid_chars => true
-  validates :description, :presence => true, :invalid_chars => 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