X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/95d899786a1bbabacc0cd12ef1c4814118d9d0de..85d17f257c338f668a1d17d9fc62a2f48ec84230:/app/models/way.rb?ds=sidebyside diff --git a/app/models/way.rb b/app/models/way.rb index 85aca4334..adf8b928f 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -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?