refactored

This commit is contained in:
dinsmol 2021-08-12 12:02:34 +03:00
parent 8f17712232
commit d2d31c049c
19 changed files with 32 additions and 112 deletions

10
app/lib/to_csv.rb Normal file
View file

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