DEV: drop the explicit .each in UserArchive CSV writing

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.

diff --git a/app/jobs/regular/export_user_archive.rb b/app/jobs/regular/export_user_archive.rb
index 8c5ed2f..8fc08d9 100644
--- a/app/jobs/regular/export_user_archive.rb
+++ b/app/jobs/regular/export_user_archive.rb
@@ -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'
diff --git a/spec/jobs/export_user_archive_spec.rb b/spec/jobs/export_user_archive_spec.rb
index 0dc84e3..e71f074 100644
--- a/spec/jobs/export_user_archive_spec.rb
+++ b/spec/jobs/export_user_archive_spec.rb
@@ -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
 

GitHub sha: 225cdba6

This commit appears in #10550 which was approved by eviltrout. It was merged by riking.