X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/db66d47e42bc267670ef00b3b2611b4b53cb40e9..80c6c685bcf097754e872ba61444fc4bb93f2515:/app/models/way.rb diff --git a/app/models/way.rb b/app/models/way.rb index 45789dabe..6c3ea9e46 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -17,8 +17,7 @@ class Way < ActiveRecord::Base def self.from_xml(xml, create=false) begin - p = XML::Parser.new - p.string = xml + p = XML::Parser.string(xml) doc = p.parse way = Way.new @@ -235,8 +234,6 @@ class Way < ActiveRecord::Base # delete a way and it's nodes that aren't part of other ways, with history def delete_with_relations_and_nodes_and_history(user) - node_ids_to_delete = node_ids - node_ids_not_to_delete - # delete the nodes not used by other ways self.unshared_node_ids.each do |node_id| n = Node.find(node_id)