Skip to content

Commit

Permalink
Use find_each in single category filter as well
Browse files Browse the repository at this point in the history
  • Loading branch information
smellsblue committed Oct 8, 2024
1 parent 50c233c commit 0181c61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/reports/total_inventory_value.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def csv_filename_scope
def each
@total_value = 0.0

category.items.order(:description).each do |item|
category.items.order(:description).find_each do |item|
value = item.total_value(at: date)
@total_value += value
yield item.description, value
Expand Down

0 comments on commit 0181c61

Please sign in to comment.