]> git.openstreetmap.org Git - rails.git/commitdiff
from_xml sets a version on nodes
authorChristopher Schmidt <crschmidt@crschmidt.net>
Sun, 11 May 2008 22:27:40 +0000 (22:27 +0000)
committerChristopher Schmidt <crschmidt@crschmidt.net>
Sun, 11 May 2008 22:27:40 +0000 (22:27 +0000)
app/models/node.rb
app/models/relation.rb
app/models/way.rb

index 7a103efa5c3954ce7a4020a653627743587f56f1..acd2519183fb3a88057d274524ee003178f38e98 100644 (file)
@@ -66,7 +66,8 @@ class Node < GeoRecord
 
   def self.from_xml_node(pt, create=false)
     node = Node.new
-
+    
+    node.version = pt['version']
     node.lat = pt['lat'].to_f
     node.lon = pt['lon'].to_f
 
index 58add6dd0e96f3c2debc71f2a699533df34f5dda..b7cb0f15bc43d35bf00703d3c7ddb8881f29e0bc 100644 (file)
@@ -31,6 +31,8 @@ class Relation < ActiveRecord::Base
       relation.id = pt['id'].to_i
     end
 
+    relation.version = pt['version']
+
     if create
       relation.timestamp = Time.now
       relation.visible = true
index 255f4329f89983c49f4a760a32df77caeafeb3f9..de69f7565c6493fa27ab466008bd24f78cf62c77 100644 (file)
@@ -31,6 +31,8 @@ class Way < ActiveRecord::Base
     if !create and pt['id'] != '0'
       way.id = pt['id'].to_i
     end
+    
+    way.version = pt['version']
 
     if create
       way.timestamp = Time.now