diff --git a/app/controllers/admin/actives_controller.rb b/app/controllers/admin/actives_controller.rb index 94e7384..9f2813e 100644 --- a/app/controllers/admin/actives_controller.rb +++ b/app/controllers/admin/actives_controller.rb @@ -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 diff --git a/app/views/admin/actives/export.xlsx.axlsx b/app/views/admin/actives/export.xlsx.axlsx index 07da836..aa0e1fc 100644 --- a/app/views/admin/actives/export.xlsx.axlsx +++ b/app/views/admin/actives/export.xlsx.axlsx @@ -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 = []