Download multiple files via send_data

Hi All,

How to download multiple files via send_data or send_files.

format.xml { send_data @records, type: “text/xml” }

I have two XML files in temp directory. currently i have ziped the folder and download as a file. But i need download the 2 files without zip concept.

If i try to download the process in loop then last file only downloaded. Can anyone help me.



You will have to initiate two separate requests from the browser (maybe Ajax or similar concept). A URL relates to one file. That's a foundation principle of the Web.