Add tags_as_hash to old_nodes
authorChristopher Schmidt <crschmidt@crschmidt.net>
Sun, 20 Apr 2008 15:12:56 +0000 (15:12 +0000)
committerChristopher Schmidt <crschmidt@crschmidt.net>
Sun, 20 Apr 2008 15:12:56 +0000 (15:12 +0000)
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