1 # == Schema Information
 
   3 # Table name: gpx_file_tags
 
   5 #  gpx_id :bigint           not null
 
   7 #  id     :bigint           not null, primary key
 
  11 #  gpx_file_tags_gpxid_idx  (gpx_id)
 
  12 #  gpx_file_tags_tag_idx    (tag)
 
  16 #  gpx_file_tags_gpx_id_fkey  (gpx_id => gpx_files.id)
 
  19 class Tracetag < ApplicationRecord
 
  20   self.table_name = "gpx_file_tags"
 
  22   belongs_to :trace, :foreign_key => "gpx_id", :inverse_of => :tags
 
  24   validates :trace, :associated => true
 
  25   validates :tag, :length => 1..255, :characters => { :url_safe => true }