Is there a way to write a csv file using a hash instead of an array?
Something like this:

header_keys = :first_name, :last_name, :email
FasterCSV.open("path/to/file.csv", "w") do |csv|
    User.all.do |user|
       csv << user
    end
  end

Thanks...

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to