exporting to text file with rails

Hi,

I have a list of emails in a users table in my database and my client
wants me to export a list of these users to a format which they can
paste into outlook so that they can bulk email them.

Does anyone have any ideas on the best way to do this? preferably a
download of the file will automatically commence on clicking of a button
or link in one of my html pages.

Cheers,

Chris

Well as far as the sending of the data you can use send_data, which allows you to send any data you want to the client (and you can set the options so that the browser will download it with the right file name etc...

Fred

Just so you know,

send_data some_data, :type => 'text/csv', :filename => filename

Should accomplish most of what you've written above.

Fred