fix MR comments

This commit is contained in:
Bilal
2020-07-13 14:04:14 +02:00
parent e0cf5ba875
commit 3ffa883462
13 changed files with 89 additions and 53 deletions

View File

@@ -21,7 +21,7 @@ class GenerateContractsZipJob < ApplicationJob
zipfile.add(attachment, File.join("#{dir}/", attachment))
end
if Object.const_get(@release_type).include?(CsvExportable)
if @release_type.constantize.include?(CsvExportable)
csv_file = generate_csv releases
zipfile.get_output_stream("#{@folder_name}.csv") { |f| f.puts(csv_file) }
end
@@ -49,7 +49,7 @@ class GenerateContractsZipJob < ApplicationJob
private
def generate_csv(releases)
release_class = Object.const_get @release_type
release_class = @release_type.constantize
headers = release_class.csv_headers
CSV.generate(headers: true) do |csv|