]> git.openstreetmap.org Git - rails.git/blob - app/models/way_tag.rb
Throw errors in the way xml parsing if there is a problem. Bring the way parsing...
[rails.git] / app / models / way_tag.rb
1 class WayTag < ActiveRecord::Base
2   set_table_name 'current_way_tags'
3
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
7
8   belongs_to :way, :foreign_key => 'id'
9   
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
14 end