1 class WayTag < ActiveRecord::Base
 
   2   set_table_name 'current_way_tags'
 
   4   # False multipart keys. The following would be a hack:
 
   5   # set_primary_keys :id, :k, :v
 
   6   # FIXME add a real multipart key to waytags so that we can do eager loadin
 
   8   belongs_to :way, :foreign_key => 'id'
 
  10   validates_presence_of :id
 
  11   validates_length_of :k, :v, :maximum => 255, :allow_blank => true
 
  12   validates_uniqueness_of :id, :scope => :k
 
  13   validates_numericality_of :id, :only_integer => true