设置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