]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_node.rb
Fixing the resync that I had done wrong at the end of last week on the nodes. All...
[rails.git] / app / models / old_node.rb
index 5d9c6d7ef31d7c8ecf57d738b92ea82021ff266e..0182845282ebc38f4f5d9f14ec1730a94ae8f468 100644 (file)
@@ -1,5 +1,5 @@
-class OldNode < GeoRecord
-  set_primary_keys :id, :version
+class OldNode < ActiveRecord::Base 
+       include GeoRecord
   set_table_name 'nodes'
   
   validates_presence_of :user_id, :timestamp
@@ -90,5 +90,21 @@ class OldNode < GeoRecord
   def tags=(t)
     @tags = t 
   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