Displaying 1 result from an estimated 1 matches for "csv_dump".
Did you mean:
cc_dump
2007 Jun 07
6
Can't download files with send_data or send_file
..._remote_tag that calls a method to print out a csv file
for download. If I tell the form_remote_tag to update a div the data
comes up in that div, but otherwise I can''t get the browser to
acknowledge the sent file.
>From view:
<%= form_remote_tag :url => {:action => "csv_dump" }%>
<%= submit_tag "Download Complete List" ,:name => "csv"%>
<%= end_form_tag %>
>From controller:
def csv_dump
@assignments = Assignment.find(:all)
report = StringIO.new
CSV::Writer.generate(report, '','')...