Railsでcsvファイル出力とか調べても model でCSV出力用のto_csvメソッド作ってcontorllerで respond_to format.csv して出力するようなのしかみつからんかった。 http://railscasts.com/episodes/362-exporting-csv-and-excel?language=ja&view=asciicast require 'csv' class User < ActiveRecord::Base def self.to_csv CSV.generate do |csv| csv << column_names all.each do |model| csv << model.attributes.values_at(*column_names) end end end end