]> git.openstreetmap.org Git - rails.git/commitdiff
changed from nd id=... to nd ref=...
authorFrederik Ramm <frederik@remote.org>
Fri, 31 Aug 2007 22:33:27 +0000 (22:33 +0000)
committerFrederik Ramm <frederik@remote.org>
Fri, 31 Aug 2007 22:33:27 +0000 (22:33 +0000)
app/models/way.rb
test/functional/way_controller_test.rb

index bb99ba33e36e468bb214006637cb7b1da494f57d..b564a3317b5bffffa0c9549960cd8af564b53ef9 100644 (file)
@@ -37,7 +37,7 @@ class Way < ActiveRecord::Base
         end
 
         pt.find('nd').each do |nd|
-          way.add_nd_num(nd['id'])
+          way.add_nd_num(nd['ref'])
         end
       end
     rescue
@@ -90,7 +90,7 @@ class Way < ActiveRecord::Base
     ordered_nodes.each do |nd_id|
       if nd_id and nd_id != '0'
         e = XML::Node.new 'nd'
-        e['id'] = nd_id
+        e['ref'] = nd_id
         el1 << e
       end
     end
index afe9e86528c24a110128469661129143f0f1f7ba..494b1be8cc8bb5f587a30863e7d9351898be8162 100644 (file)
@@ -49,7 +49,7 @@ class WayControllerTest < Test::Unit::TestCase
     basic_authorization "test@openstreetmap.org", "test"
 
     # create a way with pre-existing nodes
-    content "<osm><way><nd id='#{nid1}'/><nd id='#{nid2}'/><tag k='test' v='yes' /></way></osm>"
+    content "<osm><way><nd ref='#{nid1}'/><nd ref='#{nid2}'/><tag k='test' v='yes' /></way></osm>"
     put :create
     # hope for success
     assert_response :success, 
@@ -80,7 +80,7 @@ class WayControllerTest < Test::Unit::TestCase
     basic_authorization "test@openstreetmap.org", "test"
 
     # create a way with non-existing node
-    content "<osm><way><nd id='0'/><tag k='test' v='yes' /></way></osm>"
+    content "<osm><way><nd ref='0'/><tag k='test' v='yes' /></way></osm>"
     put :create
     # expect failure
     assert_response :precondition_failed,