]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Treat all newly entered blocks of text as Markdown
[rails.git] / app / models / way.rb
index 85aca4334a482125a068c9bd21d573d3e6b9dc7e..adf8b928fa7a75fe8100455d7b51373e515bee7c 100644 (file)
@@ -3,7 +3,7 @@ class Way < ActiveRecord::Base
   
   include ConsistencyValidations
 
-  set_table_name 'current_ways'
+  self.table_name = "current_ways"
   
   belongs_to :changeset
 
@@ -64,6 +64,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?