]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/tracepoint.rb
Move close button out of right sidebar content
[rails.git] / app / models / tracepoint.rb
index b3c37430d8624a0c61d419e1b8e2ae9bec23e3d6..198d8cd3e8914566ee0baf12d12abcf3d7502de5 100644 (file)
@@ -6,9 +6,9 @@
 #  trackid   :integer          not null
 #  latitude  :integer          not null
 #  longitude :integer          not null
-#  gpx_id    :bigint(8)        not null
+#  gpx_id    :bigint           not null
 #  timestamp :datetime
-#  tile      :bigint(8)
+#  tile      :bigint
 #
 # Indexes
 #
@@ -30,5 +30,5 @@ class Tracepoint < ApplicationRecord
   validates :trace, :associated => true
   validates :timestamp, :presence => true
 
-  belongs_to :trace, :foreign_key => "gpx_id"
+  belongs_to :trace, :foreign_key => "gpx_id", :inverse_of => :points
 end