Data hosted with ♥ by
Pastebin.com
-
Download Raw
-
See Original
class
ClientsController
<
ApplicationController
def
download_pdf
client = Client.
find
(
params
[
:id
]
)
send_file
(
"#{Rails.root}/files/clients/#{client.id}.pdf"
,
filename:
"#{client.name}.pdf"
,
type:
"application/pdf"
)
end
end