]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Added a bunch more tests on the API 0.6. Fixed node/way/relation from_xml code to...
[rails.git] / app / models / way.rb
index f26d7658b14589eb0b81187c2cb42882db37b9a2..90458006e8cf15a64a85bd797a5bf6a4116d2130 100644 (file)
@@ -169,6 +169,11 @@ class Way < ActiveRecord::Base
 
   def add_tag_keyval(k, v)
     @tags = Hash.new unless @tags
+
+    # duplicate tags are now forbidden, so we can't allow values
+    # in the hash to be overwritten.
+    raise OSM::APIDuplicateTagsError.new if @tags.include? k
+
     @tags[k] = v
   end