I'm using rails and prawn pdf to generate report in pdf format
I would like to ask is it possible to generate 2 or more pdf documents from one controller (I'm using respond_to to generate pdf)
below is currently my controller that can generate only one pdf, I need to create pdf with different format for owner and end users
thank you
def show
@family = Family.find(params[:id])
respond_to do |format|
format.html
format.pdf do
pdf = familyPdf.new(@family)
send_data pdf.render, filename: "family_#{@family.father_name}.pdf",
type: "application/pdf",
disposition: "inline"
end
end
end