]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_node.rb
Update old changesets to subscribe the creator
[rails.git] / app / models / old_node.rb
index 3a0ecc367a5b98f7862bdc7fb91039102db6d431..90304acae4c1f9dadbaceaecc37475703648cbdd 100644 (file)
@@ -80,14 +80,7 @@ class OldNode < ActiveRecord::Base
   end
 
   def tags
-    unless @tags
-      @tags = Hash.new
-      self.old_tags.each do |tag|
-        @tags[tag.k] = tag.v
-      end
-    end
-    @tags = Hash.new unless @tags
-    @tags
+    @tags ||= Hash[self.old_tags.collect { |t| [t.k, t.v] }]
   end
 
   def tags=(t)