Skip to content

Commit

Permalink
Revert rubocop autocorrect, each is needed here for find_each is not …
Browse files Browse the repository at this point in the history
…available for Arrays
  • Loading branch information
luisramos0 committed Aug 19, 2020
1 parent 280daad commit f51f244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/spree/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def remove_variant(variant)
end

def cap_quantity_at_stock!
line_items.includes(variant: :stock_items).all.find_each(&:cap_quantity_at_stock!)
line_items.includes(variant: :stock_items).all.each(&:cap_quantity_at_stock!)
end

def set_distributor!(distributor)
Expand Down

0 comments on commit f51f244

Please sign in to comment.