X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ddd5b4cf19a92582fd114914be5bd5a04d3522a7..c5f33db61e8ac24e578ae431f95a2566255fbf27:/app/models/way.rb diff --git a/app/models/way.rb b/app/models/way.rb index ff2e64370..1fe628171 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -177,14 +177,13 @@ class Way < ActiveRecord::Base WayNode.delete_all(['id = ?', self.id]) - i = 1 + sequence = 1 nds.each do |n| nd = WayNode.new - nd.id = self.id + nd.id = [self.id, sequence] nd.node_id = n - nd.sequence_id = i nd.save! - i += 1 + sequence += 1 end end