Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement