X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/b2a8df0bd73f1031dcf4684e084897a28b117345..3666b674330ec8d14a224932a191d6121c5974e2:/app/models/redaction.rb diff --git a/app/models/redaction.rb b/app/models/redaction.rb index b835864db..f4eedde0a 100644 --- a/app/models/redaction.rb +++ b/app/models/redaction.rb @@ -7,7 +7,7 @@ # description :text # 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 @@ -24,14 +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 :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