diff --git a/db/migrate/20200912190210_update_weight_calculators.rb b/db/migrate/20200912190210_update_weight_calculators.rb index 4ee5a0dfc0..bf027fd257 100644 --- a/db/migrate/20200912190210_update_weight_calculators.rb +++ b/db/migrate/20200912190210_update_weight_calculators.rb @@ -1,6 +1,6 @@ class UpdateWeightCalculators < ActiveRecord::Migration def change - Calculator::Weight.each { |calculator| + Calculator::Weight.all.each { |calculator| calculator.preferred_unit_from_list = 'kg' calculator.preferred_per_unit = calculator.preferred_per_kg calculator.preferences.delete(:preferred_per_kg)