Remove without_protection: true argument from #create calls

Needed for using Strong Parameters in Rails 4
This commit is contained in:
Matt-Yorkley
2019-12-21 22:19:06 +01:00
parent 3896644a04
commit f5bc120fb1
9 changed files with 15 additions and 18 deletions

View File

@@ -59,7 +59,7 @@ module OpenFoodNetwork
option_type = product.variant_unit_option_type
if option_type
name = option_value_name
ov = Spree::OptionValue.where(option_type_id: option_type, name: name, presentation: name).first || Spree::OptionValue.create!({ option_type: option_type, name: name, presentation: name }, without_protection: true)
ov = Spree::OptionValue.where(option_type_id: option_type, name: name, presentation: name).first || Spree::OptionValue.create!({ option_type: option_type, name: name, presentation: name })
option_values << ov
end
end