Skip to content

Instantly share code, notes, and snippets.

@captproton
Created August 16, 2012 03:40
Show Gist options
  • Select an option

  • Save captproton/3366380 to your computer and use it in GitHub Desktop.

Select an option

Save captproton/3366380 to your computer and use it in GitHub Desktop.
csv not working
class Lead < ActiveRecord::Base
def self.to_csv
CSV.generate do |csv|
csv << self.column_names.humanize.titleize
all.each do |lead|
csv << lead.attributes.values_at(*column_names)
end
end
end
# acts_as_taggable
# acts_as_taggable_on :color
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment