导出数据空行

chromesetting
daiao 5 years ago
parent 3b8bd6d454
commit fed9f6e912

@ -115,10 +115,13 @@ class Admins::ShixunSettingsController < Admins::BaseController
sheet1[count_row, 5] = shixun.user.show_real_name
sheet1[count_row, 6] = shixun.user.school_name
sheet1[count_row, 7] = shixun.user.identity
shixun.challenges.each do |challenge|
challenge_count = shixun.challenges.count
shixun.challenges.each_with_index do |challenge, index|
sheet1[count_row, 8] = "#{challenge.position}"
sheet1[count_row, 9] = challenge.subject
count_row += 1
if index + 1 != challenge_count
count_row += 1
end
end
count_row += 1
end

Loading…
Cancel
Save