export_csv

Very simple tool to export all records of an ActiveRecord model to a CSV file.

Examples

The only required parameter is the model name:

export_csv(User)

The name of the generated file can be overriden by passing it with the :filename option:

export_csv(User, :filename => "People")

Find options for the model may also be passed with :parameters

export_csv(User, :parameters => { :limit => 20, :order => "name asc" })

Copyright © 2009 Robby Colvin, released under the MIT license