diff --git a/app/models/product_import/entry_validator.rb b/app/models/product_import/entry_validator.rb index 54dde4578ad..3efaeab45d6 100644 --- a/app/models/product_import/entry_validator.rb +++ b/app/models/product_import/entry_validator.rb @@ -179,7 +179,7 @@ def tax_and_shipping_validation(entry, type, category, index) return if category.blank? if index.key? category - entry.send("#{type}_category_id=", index[category]) + entry.public_send("#{type}_category_id=", index[category]) else mark_as_invalid(entry, attribute: "#{type}_category", error: I18n.t('admin.product_import.model.not_found')) end @@ -244,11 +244,11 @@ def non_updatable_fields end def attributes_match?(attribute, existing_product, entry) - existing_product.send(attribute) == entry.send(attribute) + existing_product.public_send(attribute) == entry.public_send(attribute) end def attributes_blank?(attribute, existing_product, entry) - existing_product.send(attribute).blank? && entry.send(attribute).blank? + existing_product.public_send(attribute).blank? && entry.public_send(attribute).blank? end def permission_by_name?(supplier_name)