]> git.openstreetmap.org Git - rails.git/blob - app/models/old_relation_tag.rb
Fix warnings from rubocop update
[rails.git] / app / models / old_relation_tag.rb
1 class OldRelationTag < ActiveRecord::Base
2   self.table_name = "relation_tags"
3   self.primary_keys = "relation_id", "version", "k"
4
5   belongs_to :old_relation, :foreign_key => [:relation_id, :version]
6
7   validates :old_relation, :presence => true, :associated => true
8   validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }
9   validates :k, :uniqueness => { :scope => [:relation_id, :version] }
10 end