]> git.openstreetmap.org Git - rails.git/blob - app/models/old_node_tag.rb
Temporary fix to avoid showing emails
[rails.git] / app / models / old_node_tag.rb
1 class OldNodeTag < ActiveRecord::Base
2   self.table_name = "node_tags"
3   self.primary_keys = "node_id", "version", "k"
4
5   belongs_to :old_node, :foreign_key => [:node_id, :version]
6
7   validates :old_node, :presence => true, :associated => true
8   validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }
9   validates :k, :uniqueness => { :scope => [:node_id, :version] }
10 end