]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_way.rb
Merge changes from trunk 7673:8632.
[rails.git] / app / models / old_way.rb
index a2b165e42716f5cfa7f095aa76654616274f95b5..edf66aac324922d26ea8090ba88062954e40df15 100644 (file)
@@ -9,6 +9,7 @@ class OldWay < ActiveRecord::Base
     old_way.user_id = way.user_id
     old_way.timestamp = way.timestamp
     old_way.id = way.id
+    old_way.version = way.version
     old_way.nds = way.nds
     old_way.tags = way.tags
     return old_way
@@ -94,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'
@@ -108,5 +110,20 @@ class OldWay < ActiveRecord::Base
       el1 << e
     end
     return el1
-  end 
+  end
+
+  # Temporary method to match interface to nodes
+  def tags_as_hash
+    return self.tags
+  end
+
+  # Temporary method to match interface to ways
+  def way_nodes
+    return self.old_nodes
+  end
+
+  # Pretend we're not in any relations
+  def containing_relation_members
+    return []
+  end
 end