X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d9e070e06956801aba2378c1b79b4d9f13ae12ee..996e60614d9d5a2e43b0ca246d9786d569fb7be2:/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