]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_way_tag.rb
Use the message title as the subject of notification mails
[rails.git] / app / models / old_way_tag.rb
index 7fe61968fd13de1e4d6d4d0ae5fe639512f4b64d..801532dbaa7632d2074e33fbb48ac4a5251285a3 100644 (file)
@@ -1,2 +1,10 @@
 class OldWayTag < ActiveRecord::Base
+  set_table_name 'way_tags'
+
+  belongs_to :old_way, :foreign_key => [:id, :version]
+
+  validates_presence_of :id
+  validates_length_of :k, :v, :maximum => 255, :allow_blank => true
+  validates_uniqueness_of :id, :scope => [:k, :version]
+  validates_numericality_of :id, :version, :only_integer => true
 end