]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/changeset_tag.rb
List all objects that are blocking a delete, in a well defined order
[rails.git] / app / models / changeset_tag.rb
index 6298fbe778e8da9870c41f3f82976ff24287a6c0..6a414a0fcb8506d2c3118361341354c42e36359f 100644 (file)
@@ -1,5 +1,8 @@
 class ChangesetTag < ActiveRecord::Base
-
   belongs_to :changeset, :foreign_key => 'id'
 
+  validates_presence_of :id
+  validates_length_of :k, :v, :maximum => 255, :allow_blank => true
+  validates_uniqueness_of :id, :scope => :k
+  validates_numericality_of :id, :only_integer => true
 end