]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_node.rb
Add support for accessing changesets as XML through the API via the
[rails.git] / app / models / old_node.rb
index 4f10e65a5767ed87fa9515a9fe74441d0f0ed0ec..247a699236c46bc76a9dc0e804051a1877709042 100644 (file)
@@ -27,6 +27,7 @@ class OldNode < GeoRecord
     old_node.timestamp = node.timestamp
     old_node.user_id = node.user_id
     old_node.id = node.id
+    old_node.version = node.version
     return old_node
   end
 
@@ -46,6 +47,7 @@ class OldNode < GeoRecord
 
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
+    el1['version'] = self.version.to_s
     return el1
   end
 
@@ -57,16 +59,13 @@ class OldNode < GeoRecord
     #ok from here
     @attributes.update(OldNode.find(:first, :conditions => ['id = ? AND timestamp = ?', self.id, self.timestamp]).instance_variable_get('@attributes'))
    
-    sequence_id = 1
     self.tags.each do |k,v|
       tag = OldNodeTag.new
       tag.k = k
       tag.v = v
       tag.id = self.id
       tag.version = self.version
-      tag.sequence_id = sequence_id
       tag.save!
-      sequence_id += 1
     end
   end