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:
parent
4aed861336
commit
225cdba676
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue