設置Apache服務器後,當我們選擇要導入我收到以下錯誤消息.csv文件如何導入.csv格式文件轉換成openproject
NoMethodError in ProductImportsController#create
undefined method `new' for :CSV:Symbol
我product_imports_controller.rb
class ProductImportsController < ApplicationController
def new
@product_import = ProductImport.new
end
def create
@product_import = ProductImport.new(params[:product_import])
if @product_import.save
redirect_to root_url, notice: "Imported products successfully."
else
render :new
end
end
end
你想上傳csv文件嗎? –
是的。現在我正在處理csv – Ajay