Hi there, I've used Prawnto quite a bit in a few Rails projects. As I'm trying to integrate it into this project, I'm unable to get it working!
I've installed the plugin, and the files are there:
script/plugin install git://github.com/thorny-sun/prawnto.git
I've added this line to environment.rb in the config block:
config.gem "prawn"
Prawn is installed as a gem and configured:
gem list --local
prawn (0.5.1)
prawn-core (0.5.1)
prawn-format (0.2.1)
prawn-layout (0.2.1)
...among others.
And lastly, I've set up my controller method to handle the PDF:
def print
@report = Report.find(params[:id])
prawnto :filename => @report.name + ".pdf", :inline => false
end
The result? A "Template Missing" error. It's looking for "print.erb". I have the view file named "print.prawn.pdf", and no other view files with the same name.
I've spent a couple hours on this, with no luck whatsoever. Any pointers you could provide would be appreciated!
Cheers, Aaron.