Bring some sort of sanity to sequence numbers for segments in a
authorTom Hughes <tom@compton.nu>
Fri, 29 Jun 2007 23:00:27 +0000 (23:00 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 29 Jun 2007 23:00:27 +0000 (23:00 +0000)
way - now everything starts counting at one again and nothing starts
at zero.

app/models/old_way.rb
app/models/way.rb

index 3bcdac8896637cc3cae469a3e5de2dce60f693fe..e4df258167ca3b7f4fff49b42f014cef4d63b6c5 100644 (file)
@@ -38,7 +38,7 @@ class OldWay < ActiveRecord::Base
       tag.save!
     end
 
-    i = 0
+    i = 1
     self.segs.each do |n|
       seg = OldWaySegment.new
       seg.id = self.id
index c6316d330809992df17afad252f77922445ab4b3..9d2239d5ca642f616a65b93a6042ec38555f57fa 100644 (file)
@@ -165,7 +165,7 @@ class Way < ActiveRecord::Base
 
         WaySegment.delete_all(['id = ?', self.id])
 
-        i = 0
+        i = 1
         segs.each do |n|
           seg = WaySegment.new
           seg.id = self.id