]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_node.rb
Merge 8381:8390 from trunk.
[rails.git] / app / models / old_node.rb
index 2c3e93b2075fc5de263923694f50221123734ec1..7bafca0531a631767bc673617c005c770d345205 100644 (file)
@@ -1,4 +1,6 @@
-class OldNode < GeoRecord
+class OldNode < ActiveRecord::Base
+  include GeoRecord
+
   set_table_name 'nodes'
   
   validates_presence_of :user_id, :timestamp
@@ -48,4 +50,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