X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3d6a3a6de33aa0c1bc436bce9ea9da33e00460ff..948fd8c8faf1016d:/app/models/node.rb diff --git a/app/models/node.rb b/app/models/node.rb index 6346907f1..f4367e459 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -185,8 +185,8 @@ class Node < ActiveRecord::Base add_metadata_to_xml_node(el, self, changeset_cache, user_display_name_cache) if visible? - el["lat"] = format("%.7f", lat) - el["lon"] = format("%.7f", lon) + el["lat"] = lat.to_s + el["lon"] = lon.to_s end add_tags_to_xml_node(el, node_tags) @@ -243,7 +243,7 @@ class Node < ActiveRecord::Base # Create a NodeTag tags = self.tags - NodeTag.delete_all(:node_id => id) + NodeTag.where(:node_id => id).delete_all tags.each do |k, v| tag = NodeTag.new tag.node_id = id