]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Adding a versionless capabilities to head, so that editors can use it now, prior...
[rails.git] / app / models / way.rb
index 45789dabe4bf5c03aff02482f6855678620f2427..6c3ea9e462dcda9b5d18b2a1d23e23a48d38ca0e 100644 (file)
@@ -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)