]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Don't show coordinates for deleted nodes
[rails.git] / app / models / way.rb
index 85aca4334a482125a068c9bd21d573d3e6b9dc7e..9bd792ddcf56dfd128e41bc2701d75f2daa0bfa3 100644 (file)
@@ -2,8 +2,9 @@ class Way < ActiveRecord::Base
   require 'xml/libxml'
   
   include ConsistencyValidations
+  include NotRedactable
 
-  set_table_name 'current_ways'
+  self.table_name = "current_ways"
   
   belongs_to :changeset
 
@@ -64,6 +65,10 @@ class Way < ActiveRecord::Base
     # and manually set to false before the actual delete.
     way.visible = true
 
+    # Start with no tags
+    way.tags = Hash.new
+
+    # Add in any tags from the XML
     pt.find('tag').each do |tag|
       raise OSM::APIBadXMLError.new("way", pt, "tag is missing key") if tag['k'].nil?
       raise OSM::APIBadXMLError.new("way", pt, "tag is missing value") if tag['v'].nil?