vendor/plugins/ar-extensions-0.7.0a/lib/ar-extensions/csv.rb
# Returns CSV data including header rows for the passed in +options+.
Returns CSV data including header rows for the passed in +options+.
Returns CSV data including header rows for the passed in + options + .
def to_csv( options={} )
      FasterCSV.generate do |csv|
        headers = self.class.to_csv_headers( options )
        csv << headers if headers
        to_csv_data( options ).each{ |data| csv << data }
      end
    end
def to_csv ( options = { } ) FasterCSV . generate do | csv | headers = self . class . to_csv_headers ( options ) csv << headers if headers to_csv_data ( options ) . each { | data | csv << data } end end
Returns CSV data including header rows for the passed in +options+.
Returns CSV data including header rows for the passed in + options + .
options
<not_specific>