]> git.openstreetmap.org Git - rails.git/blob - app/models/tracetag.rb
Merge remote-tracking branch 'upstream/pull/2191'
[rails.git] / app / models / tracetag.rb
1 # == Schema Information
2 #
3 # Table name: gpx_file_tags
4 #
5 #  gpx_id :integer          default(0), not null
6 #  tag    :string           not null
7 #  id     :integer          not null, primary key
8 #
9 # Indexes
10 #
11 #  gpx_file_tags_gpxid_idx  (gpx_id)
12 #  gpx_file_tags_tag_idx    (tag)
13 #
14 # Foreign Keys
15 #
16 #  gpx_file_tags_gpx_id_fkey  (gpx_id => gpx_files.id)
17 #
18
19 class Tracetag < ActiveRecord::Base
20   self.table_name = "gpx_file_tags"
21
22   belongs_to :trace, :foreign_key => "gpx_id"
23
24   validates :trace, :associated => true
25   validates :tag, :length => 1..255, :characters => { :url_safe => true }
26 end