From: Frederik Ramm Date: Fri, 31 Aug 2007 22:33:27 +0000 (+0000) Subject: changed from nd id=... to nd ref=... X-Git-Tag: live~8097^2~23 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6d07f5661a4530b334ab752044536e8bdb201b02?hp=3e18c51695afb2dc8ec0d87eabee41d13899acfd changed from nd id=... to nd ref=... --- diff --git a/app/models/way.rb b/app/models/way.rb index bb99ba33e..b564a3317 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -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 diff --git a/test/functional/way_controller_test.rb b/test/functional/way_controller_test.rb index afe9e8652..494b1be8c 100644 --- a/test/functional/way_controller_test.rb +++ b/test/functional/way_controller_test.rb @@ -49,7 +49,7 @@ class WayControllerTest < Test::Unit::TestCase basic_authorization "test@openstreetmap.org", "test" # create a way with pre-existing nodes - content "" + content "" 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 "" + content "" put :create # expect failure assert_response :precondition_failed,