]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_node.rb
Add an ACL system to allow key/value pairs to be attached to blocks
[rails.git] / app / models / old_node.rb
index 2c3e93b2075fc5de263923694f50221123734ec1..76eab8427b2c570cce79846887706eb6c10923b6 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,22 @@ 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
+
+  # Pretend we're not in any ways
+  def ways
+    return []
+  end
+
+  # Pretend we're not in any relations
+  def containing_relation_members
+    return []
+  end
 end