1 # frozen_string_literal: true
 
   3 # == Schema Information
 
   5 # Table name: gpx_file_tags
 
   7 #  gpx_id :bigint           not null
 
   9 #  id     :bigint           not null, primary key
 
  13 #  gpx_file_tags_gpxid_idx  (gpx_id)
 
  14 #  gpx_file_tags_tag_idx    (tag)
 
  18 #  gpx_file_tags_gpx_id_fkey  (gpx_id => gpx_files.id)
 
  21 class Tracetag < ApplicationRecord
 
  22   self.table_name = "gpx_file_tags"
 
  24   belongs_to :trace, :foreign_key => "gpx_id", :inverse_of => :tags
 
  26   validates :trace, :associated => true
 
  27   validates :tag, :length => 1..255, :characters => { :url_safe => true }