1 # == Schema Information
3 # Table name: gps_points
6 # trackid :integer not null
7 # latitude :integer not null
8 # longitude :integer not null
9 # gpx_id :bigint(8) not null
15 # points_gpxid_idx (gpx_id)
16 # points_tile_idx (tile)
20 # gps_points_gpx_id_fkey (gpx_id => gpx_files.id)
23 class Tracepoint < ApplicationRecord
26 self.table_name = "gps_points"
28 validates :trackid, :numericality => { :only_integer => true }
29 validates :latitude, :longitude, :numericality => { :only_integer => true }
30 validates :trace, :associated => true
31 validates :timestamp, :presence => true
33 belongs_to :trace, :foreign_key => "gpx_id", :inverse_of => :points