Marnen Laibow-Koser wrote: > Mamadou Touré wrote: > [...] >> >> I'm having the file displayed now, but the other issue that I'm facing >> now is : I have several files to open, I put them in an array that I >> loop through, but only the last file is opened: >> >> What's wrong ? >> >> arr.each do |form| >> file_name = form + "-" + vue.inte_no.to_s + "-" + vue.poas_id.to_s >> + "-" + vue.prch_id.to_s + ".xdp" >> send_file(path_pdf_cpy + file_name,:type => 'application/pdf' , >> :disposition => 'attachment', :filename => file_name) >> end > > You can't send multiple files in response to one request. Do you want > to join the pages of the PDF files into one long file? > > > > > Best, > --
Thanks Marnen, Unfortunately I have to hav each file on its own, I must not merge them in on single file. Is there a way to simulate several requests in order to loop through the array ? > Marnen Laibow-Koser > http://www.marnen.org > mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.