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 4cac233..baf2ea7 100644 (file)
@@ -190,7 +190,7 @@ class Trace < ActiveRecord::Base
 
         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
index e0fcfbd..1d9f1bd 100644 (file)
@@ -25,7 +25,7 @@ class Tracepoint < ActiveRecord::Base
     self.latitude = (l * 10000000).round
   end
 
-  def lng=(l)
+  def lon=(l)
     self.longitude = (l * 10000000).round
   end