Commit a9e3b746 by liyijie

add export_headers method default

parent 33d7ab3e
......@@ -107,7 +107,11 @@ module TalltyImportExport
end
def export_headers_result
@headers || klass.try(:export_headers) || klass.try(:headers) || klass.try(:model_headers)
@headers || export_headers
end
def export_headers
@headers || klass.try(:headers) || klass.try(:model_headers)
end
# 处理一个记录的数据
......
......@@ -16,10 +16,6 @@ module TalltyImportExport
def export_xlsx records, **options
export_instance.export_xlsx(records, **options)
end
def export_headers
export_instance.export_headers
end
end
end
end
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