mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 12:17:30 +02:00
10 lines
192 B
Ruby
10 lines
192 B
Ruby
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
|