How to save a pdf file in local

I would like to know how to save a pdf file (generated with pdf-writer)
in a local folder.

pdf.save_as(“public/yourdirector/” + whatevername + “.pdf”)
I think that should do

On Mar 17, 6:56 pm, John S. [email protected]

dhaval wrote:

pdf.save_as(“public/yourdirector/” + whatevername + “.pdf”)
I think that should do

On Mar 17, 6:56 pm, John S. [email protected]

I have this code to generate the pdf:
format.pdf do
send_data RepairTicketDrawer.draw(@repair_ticket), :filename =>
‘repair_tickets/@repair_ticket.id.pdf’, :type => ‘application/pdf’,
:disposition => ‘inline’
end

How can I save it? I can’t just put pdf.save.

John S. wrote:

dhaval wrote:

pdf.save_as(“public/yourdirector/” + whatevername + “.pdf”)
I think that should do

On Mar 17, 6:56 pm, John S. [email protected]

I have this code to generate the pdf:
format.pdf do
send_data RepairTicketDrawer.draw(@repair_ticket), :filename =>
‘repair_tickets/@repair_ticket.id.pdf’, :type => ‘application/pdf’,
:disposition => ‘inline’
end

How can I save it? I can’t just put pdf.save.

Ok, it’s already done. I have to use this method in the Drawer.