]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
Replace the country table with a static XML countries file
[rails.git] / app / models / node.rb
index 9cac9839b3600b257a94a9feed25a0fcd7b54f00..12ffa20917c840c7eb172687a31265419a90cfde 100644 (file)
@@ -196,13 +196,7 @@ class Node < ActiveRecord::Base
   end
 
   def tags
-    unless @tags
-      @tags = {}
-      self.node_tags.each do |tag|
-        @tags[tag.k] = tag.v
-      end
-    end
-    @tags
+    @tags ||= Hash[self.node_tags.collect { |t| [t.k, t.v] }]
   end
 
   def tags=(t)