]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_way.rb
Merge remote-tracking branch 'upstream/pull/3264'
[rails.git] / app / models / old_way.rb
index 1ee6935ed6c0b0b505d1fdc1eb147041f2174804..3260f2a1f57acbed3755fe691949d8e14fa1fbbc 100644 (file)
@@ -27,7 +27,7 @@ class OldWay < ApplicationRecord
   self.table_name = "ways"
   self.primary_keys = "way_id", "version"
 
-  # note this needs to be included after the table name changes, or
+  # NOTE: this needs to be included after the table name changes, or
   # the queries generated by Redactable will use the wrong table name.
   include Redactable
 
@@ -81,7 +81,7 @@ class OldWay < ApplicationRecord
   end
 
   def tags
-    @tags ||= Hash[old_tags.collect { |t| [t.k, t.v] }]
+    @tags ||= old_tags.collect { |t| [t.k, t.v] }.to_h
   end
 
   attr_writer :nds, :tags