- belongs_to :user
- belongs_to :trace, :foreign_key => 'gpx_id'
-
- def lat=(l)
- self.latitude = l * 1000000
- end
-
- def lng=(l)
- self.longitude = l * 1000000
- end
+ validates_numericality_of :trackid, :only_integer => true
+ validates_numericality_of :latitude, :only_integer => true
+ validates_numericality_of :longitude, :only_integer => true
+ validates_associated :trace
+ validates_presence_of :timestamp