]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/concerns/geo_record.rb
Correct path for mapnik marker images
[rails.git] / app / models / concerns / geo_record.rb
index 91533ece438f89fd9cf8440bfd5400d84ad9addf..a5635c1729b2610442df10a8019f30f2ad614029 100644 (file)
@@ -10,7 +10,11 @@ module GeoRecord
     end
 
     def to_s
-      format("%.7f", self)
+      format("%<coord>.7f", :coord => self)
+    end
+
+    def as_json(_)
+      format("%<coord>.7f", :coord => self).to_f
     end
   end