Replace deprecated #in? method

This commit is contained in:
Matt-Yorkley
2019-12-23 13:35:58 +01:00
parent a059c11d0f
commit d511763733

View File

@@ -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