Commit 9d299753 by Ivan Lan

fix: dup options

parent 4a426605
...@@ -29,14 +29,14 @@ module TalltyImportExport ...@@ -29,14 +29,14 @@ module TalltyImportExport
# 导出excel的空模版 # 导出excel的空模版
def export_template_xlsx(**options) def export_template_xlsx(**options)
Rails.logger.info options origin_options = options.dup
process_options(options) process_options(options)
Axlsx::Package.new do |pack| Axlsx::Package.new do |pack|
pack.use_shared_strings = true pack.use_shared_strings = true
workbook = pack.workbook workbook = pack.workbook
export_workbook workbook, **options export_workbook workbook, **origin_options
file_path = File.join(Rails.root, 'public', 'import') file_path = File.join(Rails.root, 'public', 'import')
FileUtils.mkdir_p(file_path) unless Dir.exist?(file_path) FileUtils.mkdir_p(file_path) unless Dir.exist?(file_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment