Generate a quick csv report

require "csv";CSV.open("file.csv", "wb") { |csv| csv << ["Column1", "Column2"]; Model.all.each {|s| csv << [s.column1, s.column2, s.column3] } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.