]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_node.rb
Add tags_as_hash to old_nodes
[rails.git] / app / models / old_node.rb
index 2c3e93b2075fc5de263923694f50221123734ec1..b6391a3d1b06c6921f835b2c0e5e57b5dc172592 100644 (file)
@@ -48,4 +48,12 @@ class OldNode < GeoRecord
     el1['timestamp'] = self.timestamp.xmlschema
     return el1
   end
+  
+  def tags_as_hash
+    hash = {}
+    Tags.split(self.tags) do |k,v|
+      hash[k] = v
+    end
+    hash
+  end
 end