Commit 555ed997 by liyijie

fix: records遍历,需要在headers上一层

parent 54d0723a
...@@ -93,11 +93,12 @@ module TalltyImportExport ...@@ -93,11 +93,12 @@ module TalltyImportExport
index = 0 index = 0
association_records.each do |association_record| association_records.each do |association_record|
row = [] row = []
headers.each_with_index do |header, col_index|
records = @each_method.present? ? records = @each_method.present? ?
(try_method(association_record, @each_method) || [nil]) : (try_method(association_record, @each_method) || [nil]) :
[association_record] [association_record]
records.each do |record| records.each do |record|
headers.each_with_index do |header, col_index|
index += 1 index += 1
_data = header[:source] ? _data = header[:source] ?
handle_data(association_record, header, index) : handle_data(association_record, header, index) :
......
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