use correct cache key for old preference

This commit is contained in:
Andy Brett
2020-09-18 14:35:51 -07:00
parent b9ee945062
commit edefe1d4bc

View File

@@ -6,7 +6,7 @@ class UpdateWeightCalculators < ActiveRecord::Migration
Calculator::Weight.all.each { |calculator|
calculator.preferred_unit_from_list = 'kg'
Rails.cache.delete("/calculator/weight/preferred_per_kg/#{calculator.id}")
Rails.cache.delete("/calculator/weight/per_kg/#{calculator.id}")
calculator.save
}
end