X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5ed2cbce027175963312c34ed3bb00cde4f5a66f..5d07b6d76c9488334608d3db57c5bc79bb6d177d:/app/models/changeset_tag.rb diff --git a/app/models/changeset_tag.rb b/app/models/changeset_tag.rb index 6298fbe77..6a414a0fc 100644 --- a/app/models/changeset_tag.rb +++ b/app/models/changeset_tag.rb @@ -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