I’ve installed the prawn gem in my application.
gem 'prawn', :git => "git://github.com/sandal/prawn.git", :tag => '0.10.2', :submodules => true
Added the pdf format to the controller on show method.
def show
@order = Order.find(params[:id])
respond_to do |format|
format.html
format.pdf { render :layout => false}
end
end
And created the show.pdf.prawn template file in my views/order directory.
show.pdf.prawn:
pdf.text "Hello World"
But when I try to load something like /order/2.pdf I get a missing template page.
What could I do to fix that?
Just missed to install the
prawntoplugin:Now it works!