]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_node_tag.rb
Validations on the way tags, with unit tests
[rails.git] / app / models / old_node_tag.rb
index 26a6c92b490f52220ce1b60f068a4b800b2071b5..392e3934ed4ada476794b61ddbd0e0a31cea7208 100644 (file)
@@ -3,5 +3,7 @@ class OldNodeTag < ActiveRecord::Base
 
   set_table_name 'node_tags'
 
+  validates_presence_of :id, :version
+  validates_length_of :k, :v, :maximum => 255, :allow_blank => true
 
 end