]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Altered old_way stuff to be Railsy like old_node is now
[rails.git] / app / models / way.rb
index f1c46abf327cf6d634d426b62b6b3721f118d16d..9bd792ddcf56dfd128e41bc2701d75f2daa0bfa3 100644 (file)
@@ -2,6 +2,7 @@ class Way < ActiveRecord::Base
   require 'xml/libxml'
   
   include ConsistencyValidations
+  include NotRedactable
 
   self.table_name = "current_ways"
   
@@ -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?