DEV: drop the explicit .each in UserArchive CSV writing

I think this is mostly stylistic, but this helps prevent explosive typos in the enum_for() line.
This commit is contained in:
Kane York 2020-08-27 17:19:37 -07:00 committed by Kane York
parent 4aed861336
commit 225cdba676
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ module Jobs
when :csv
CSV.open("#{dirname}/#{component[:filename]}.csv", "w") do |csv|
csv << get_header(component[:name])
public_send(component[:method]).each { |d| csv << d }
public_send(component[:method]) { |d| csv << d }
end
else
raise 'unknown export filetype'

View File

@ -17,7 +17,7 @@ describe Jobs::ExportUserArchive do
def make_component_csv
CSV.generate do |csv|
csv << job.get_header(component)
job.public_send(:"#{component}_export").each { |d| csv << d }
job.public_send(:"#{component}_export") { |d| csv << d }
end
end