fix error
This commit is contained in:
parent
9f3a4fb528
commit
7e544b3fa4
|
@ -86,10 +86,10 @@ class Admin::ActivesController < OrbitAdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
def export
|
def export
|
||||||
|
title = @act.title.gsub(/\\|\//,'_')
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.xlsx {
|
format.xlsx {
|
||||||
response.headers['Content-Disposition'] = 'attachment; filename="export.xlsx"'
|
response.headers['Content-Disposition'] = "attachment; filename=\"#{title}.xlsx\""
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
wb = xlsx_package.workbook
|
wb = xlsx_package.workbook
|
||||||
|
|
||||||
wb.add_worksheet(name: @act.title) do |sheet|
|
wb.add_worksheet(name: t('module_name.active')) do |sheet|
|
||||||
|
|
||||||
row = []
|
row = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue