]> git.openstreetmap.org Git - rails.git/commitdiff
Make the name of the lon/lng virtual attribute on trace points consistent.
authorTom Hughes <tom@compton.nu>
Fri, 28 Sep 2007 23:19:19 +0000 (23:19 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 28 Sep 2007 23:19:19 +0000 (23:19 +0000)
app/models/trace.rb
app/models/tracepoint.rb

index 4cac233c2fd51c5147c627ba0c1f92606755cc9c..baf2ea7d27592dba4c88baebbfd734f1a8c0ed17 100644 (file)
@@ -190,7 +190,7 @@ class Trace < ActiveRecord::Base
 
         tp = Tracepoint.new
         tp.lat = point['latitude'].to_f
 
         tp = Tracepoint.new
         tp.lat = point['latitude'].to_f
-        tp.lng = point['longitude'].to_f
+        tp.lon = point['longitude'].to_f
         tp.altitude = point['altitude'].to_f
         tp.timestamp = point['timestamp']
         tp.gpx_id = id
         tp.altitude = point['altitude'].to_f
         tp.timestamp = point['timestamp']
         tp.gpx_id = id
index e0fcfbd9775858b48c5daf9b9d4a0959d6f3f215..1d9f1bd6bf5e57e24188a0ea83b1e724dc834c2a 100644 (file)
@@ -25,7 +25,7 @@ class Tracepoint < ActiveRecord::Base
     self.latitude = (l * 10000000).round
   end
 
     self.latitude = (l * 10000000).round
   end
 
-  def lng=(l)
+  def lon=(l)
     self.longitude = (l * 10000000).round
   end
 
     self.longitude = (l * 10000000).round
   end