mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36:22 +02:00
Migrate ToCsv
module to CsvGenerator
service
This commit is contained in:
parent
daafa756aa
commit
e50501f13f
16 changed files with 34 additions and 60 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue