mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
refactored
This commit is contained in:
parent
8f17712232
commit
d2d31c049c
19 changed files with 32 additions and 112 deletions
10
app/lib/to_csv.rb
Normal file
10
app/lib/to_csv.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue