fix error

This commit is contained in:
邱博亞 2021-11-18 16:11:37 +08:00
parent 9f3a4fb528
commit 7e544b3fa4
2 changed files with 3 additions and 3 deletions

View File

@ -86,10 +86,10 @@ class Admin::ActivesController < OrbitAdminController
end
def export
title = @act.title.gsub(/\\|\//,'_')
respond_to do |format|
format.xlsx {
response.headers['Content-Disposition'] = 'attachment; filename="export.xlsx"'
response.headers['Content-Disposition'] = "attachment; filename=\"#{title}.xlsx\""
}
end

View File

@ -2,7 +2,7 @@
wb = xlsx_package.workbook
wb.add_worksheet(name: @act.title) do |sheet|
wb.add_worksheet(name: t('module_name.active')) do |sheet|
row = []