]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/concerns/geo_record.rb
Merge remote-tracking branch 'upstream/pull/2673'
[rails.git] / app / models / concerns / geo_record.rb
index dbda2960f65ce6ad72d7eaf996b9bbee76fc57e0..447ee19df61050e83f229619db8968351498a62a 100644 (file)
@@ -1,5 +1,3 @@
-require "delegate"
-
 module GeoRecord
   extend ActiveSupport::Concern
 
@@ -14,6 +12,10 @@ module GeoRecord
     def to_s
       format("%.7f", self)
     end
+
+    def as_json(_)
+      format("%.7f", self).to_f
+    end
   end
 
   # This scaling factor is used to convert between the float lat/lon that is