CSV generate on Rails

config/application.rb

Model

Controller

View