summaryrefslogtreecommitdiff
path: root/lib/banzai/reference_parser/base_parser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/banzai/reference_parser/base_parser.rb')
-rw-r--r--lib/banzai/reference_parser/base_parser.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/banzai/reference_parser/base_parser.rb b/lib/banzai/reference_parser/base_parser.rb
index b121c37c5d0..52fdb9a2140 100644
--- a/lib/banzai/reference_parser/base_parser.rb
+++ b/lib/banzai/reference_parser/base_parser.rb
@@ -134,9 +134,7 @@ module Banzai
ids = unique_attribute_values(nodes, attribute)
rows = collection_objects_for_ids(collection, ids)
- rows.each_with_object({}) do |row, hash|
- hash[row.id] = row
- end
+ rows.index_by(&:id)
end
# Returns an Array containing all unique values of an attribute of the