Prawn disposition: "inline" not working
I have been following the Railscast video #153 PDFs with prawn. I want the PDF to display inline instead of down loading it, the following is my code;
def show
respond_to do |format|
format.html
format.pdf do
pdf = Prawn::Document.new
pdf.text "Origin: "+@pallet.origin_cc
send_data pdf.render, filename: "Pallet #{@pallet.id}.pdf",
type: "application/pdf",
disposition: "inline"
end
end
end
I am using rails 5.1.7, ruby 2.5.3 and prawn 2.2.2.
However the file is not shown inline but is still down loaded. What could be the cause of this?
I deleted all the old pallet data, created some new data and that displayed inline without any problem.