mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
use #find_each instead of #each
This commit is contained in:
@@ -3,7 +3,7 @@ class MigrateVariantUnitValues < ActiveRecord::Migration
|
||||
Spree::Variant.includes(:product).where(
|
||||
spree_products: { variant_unit: "items" },
|
||||
spree_variants: { unit_value: nil }
|
||||
).each do |variant|
|
||||
).find_each do |variant|
|
||||
variant.unit_value = 1
|
||||
variant.save
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user