(PRAWN) PDF created but PDF won't download

I can create a PDF document using PRAWN, but when I try to download as an attachment via a link, nothing appears to happen. When I go into the /tmp/pdfs/ directory of my rails app, I can see the created PDF document.

Can anyone see why the pdf doc will not download?

Thanks,

Frank

VIEW

Have you checked the html of the page to see if the link looks correct (View, Page Source or similar in your browser). If it does look ok does it work if you type it into browser directly?

Colin

I can create a PDF document using PRAWN, but when I try to download as an attachment via a link, nothing appears to happen. When I go into the /tmp/pdfs/ directory of my rails app, I can see the created PDF document.

Because you've got a link_to_remote - that just creates a Ajax.Request object that fetches the data and then ignores it - use a regular link.

Fred

That worked Fred. Thank you both for your help.

Frederick Cheung wrote: