]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/redaction.rb
Create invalid_char validators and apply to models
[rails.git] / app / models / redaction.rb
index b835864db074b40e7c27cfd8521e0689b96aa979..d9a5c6cd793091fd893facd7b8130c1af2bc2473 100644 (file)
@@ -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
@@ -31,6 +31,7 @@ class Redaction < ActiveRecord::Base
   has_many :old_ways
   has_many :old_relations
 
+  validates :title, :description, :invalid_chars => true
   validates :description, :presence => true
   validates :description_format, :inclusion => { :in => %w[text html markdown] }