]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
Make things work with multipart keys.
[rails.git] / app / models / node.rb
index 59aa4d36ffd01ef845896ca1199594253a6ef0fe..08a675b430960d81dc0276584fa75eea0c18de99 100644 (file)
@@ -9,6 +9,7 @@ class Node < GeoRecord
   validate :validate_position
 
   has_many :old_nodes, :foreign_key => :id
+  has_many :way_nodes
   belongs_to :user
  
   def validate_position
@@ -110,4 +111,13 @@ class Node < 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