From d5117637331f8b462f8dbf9186b18cdc4a3e771f Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Mon, 23 Dec 2019 13:35:58 +0100 Subject: [PATCH] Replace deprecated #in? method --- app/models/product_import/product_importer.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/product_import/product_importer.rb b/app/models/product_import/product_importer.rb index 3fc9b5c07c..80a9744493 100644 --- a/app/models/product_import/product_importer.rb +++ b/app/models/product_import/product_importer.rb @@ -214,7 +214,9 @@ module ProductImport end def accepted_mimetype - File.extname(@file.path).in?('.csv', '.xls', '.xlsx', '.ods') ? @file.path.split('.').last.to_sym : false + return false unless ['.csv'].include? File.extname(@file.path) + + @file.path.split('.').last.to_sym end def headers