]> git.openstreetmap.org Git - rails.git/commitdiff
api06: Return version ids in XML responses.
authorGabriel Ebner <gabriel@svn.openstreetmap.org>
Sun, 4 May 2008 10:01:23 +0000 (10:01 +0000)
committerGabriel Ebner <gabriel@svn.openstreetmap.org>
Sun, 4 May 2008 10:01:23 +0000 (10:01 +0000)
app/models/node.rb
app/models/old_node.rb
app/models/old_relation.rb
app/models/old_way.rb
app/models/relation.rb
app/models/way.rb

index 17521428ea260cc9bab6defcdcc9457958968f70..5e5e7a0b2671166c6ce3a596ea00d59316e1c77d 100644 (file)
@@ -152,6 +152,7 @@ class Node < GeoRecord
 
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
+    el1['version'] = self.version.to_s
     return el1
   end
 
index 2f960d8866a3239066a14f1198ddac08a06646ff..247a699236c46bc76a9dc0e804051a1877709042 100644 (file)
@@ -47,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
 
index 076c03eec72dad790f09a3857038a071ca99d96a..03d5aebfff3006eaa91036b5efa26118835b7223 100644 (file)
@@ -92,6 +92,7 @@ class OldRelation < ActiveRecord::Base
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
     el1['user'] = self.user.display_name if self.user.data_public?
+    el1['version'] = self.version.to_s
     
     self.old_members.each do |member|
       e = XML::Node.new 'member'
index cdc0c4717c1df571f8a289c7907a71586e69a9e4..136e647938122d69a83ed5669521dbe4e64f54ec 100644 (file)
@@ -95,6 +95,7 @@ class OldWay < ActiveRecord::Base
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
     el1['user'] = self.user.display_name if self.user.data_public?
+    el1['version'] = self.version.to_s
     
     self.old_nodes.each do |nd| # FIXME need to make sure they come back in the right order
       e = XML::Node.new 'nd'
index 3a9c0d9d5ff4b881b895b9c2492167814ee7a690..ec8c92c927a6239a4c0cb4320915dec1ba286887 100644 (file)
@@ -58,6 +58,7 @@ class Relation < ActiveRecord::Base
     el1['id'] = self.id.to_s
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
+    el1['version'] = self.version.to_s
 
     user_display_name_cache = {} if user_display_name_cache.nil?
     
index 56c0717a7ac1ffc1ff713703b55d7d0320877880..104c550a9b29c1294eb1b9bc856ba95901497d32 100644 (file)
@@ -70,6 +70,7 @@ class Way < ActiveRecord::Base
     el1['id'] = self.id.to_s
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
+    el1['version'] = self.version.to_s
 
     user_display_name_cache = {} if user_display_name_cache.nil?