]> git.openstreetmap.org Git - rails.git/blob - app/models/trace.rb
- fixed map api call in version 0.4.
[rails.git] / app / models / trace.rb
1 class Trace < ActiveRecord::Base
2   set_table_name 'gpx_files'
3
4   belongs_to :user
5   has_many :tags, :class_name => 'Tracetag', :foreign_key => 'gpx_id', :dependent => :destroy
6
7   def tagstring=(s)
8     self.tags = s.split().collect {|tag|
9       tt = Tracetag.new
10       tt.tag = tag
11       tt
12     }
13   end
14 end