PP
Size: a a a
PP
PP
line_items.inject({}) do |tax_groups, line_item|
if tax_groups.key?(line_item["tax_lines"])
tax_groups[key].push(line_item)
else
tax_groups[key] = [line_item]
end
tax_groups
end
tax_groups = line_items.group_by { |li| li["tax_lines"] }
w
PP
w
w
w
PP
Enumerable
.Enumerable
. Пригодилось.w
w
w
w
w
PP
AK
M
AD
M