1 # frozen_string_literal: true
 
   3 # == Schema Information
 
   5 # Table name: current_way_tags
 
   7 #  way_id :bigint           not null, primary key
 
   8 #  k      :string           default(""), not null, primary key
 
   9 #  v      :string           default(""), not null
 
  13 #  current_way_tags_id_fkey  (way_id => current_ways.id)
 
  16 class WayTag < ApplicationRecord
 
  17   self.table_name = "current_way_tags"
 
  21   validates :way, :associated => true
 
  22   validates :k, :v, :allow_blank => true, :length => { :maximum => 255 }, :characters => true
 
  23   validates :k, :uniqueness => { :scope => :way_id }