Migrate ToCsv module to CsvGenerator service

This commit is contained in:
Thiago Youssef 2022-04-01 10:59:04 +03:00
parent daafa756aa
commit e50501f13f
16 changed files with 34 additions and 60 deletions

View file

@ -1,10 +0,0 @@
module ToCsv
def to_csv
CSV.generate do |csv|
csv << column_names
all.find_each do |item|
csv << item.attributes.values_at(*column_names)
end
end
end
end