]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
Require i18n-js 3.0.0.rc5.3 for proper dependency on configuration
[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)