1
控制器方法爲什麼它顯示在我的代碼缺少模板錯誤
def export
@customers =Customer.all
flash[:success] = "Script ran successfully"
end
我想所有的客戶導出爲CSV文件,但我收到一個缺少模板錯誤。爲什麼?在我的視圖文件夾中,我有一個按鈕。
<p><%= button_to 'export Import', scripts_export_data_path %></p>
我想導出客戶數據到上面的按鈕。
請張貼完整的錯誤跟蹤 –
@PetrGazarov我有編輯自己的帖子 – user2803053
http://stackoverflow.com/questions/17014912/how-to-download -a-csv-file-in-ruby-on-rails –