ActiveRecord::Extensions SQLite Compatibility 21 Dec 2006
The upcoming 0.2.0 release is going to include SQLite compatibility, and it looks like that is going to be released before the weekend hits! Any one out there who uses SQLite and wants to leverage the usefulness of ActiveRecord::Extensions, wait no longer (then 1 to 2 more days)!

The upcoming 0.2.0 release will update the to_csv and to_csv_file method arguments.

# rather then
array_of_models.to_csv( :headers => [ :field1, :field2, :field3 ] )

# it'll be
array_of_models.to_csv( :headers => true|false, :only=> [ :field1, :field2, :field3 ] )

# or
array_of_models.to_csv( :headers => true|false, :except=> [ :id ] )

# and the same goes for the options that were passed into to_csv_file as well
array_of_models.to_csv_file( filename, :headers=>[ :name, :salary ] )

Thanks to Dan Kubb for bringing this up. The API is borrowed from Chris Abad’s “ToCSV plugin.”:

After that I’ll be on holiday vacation and I hope to kick out some cool stuff, like the :include option that Dan Kubb “mentioned.”: for the to_csv.

blog comments powered by Disqus