I tried to generate PDFs with .rfpdf-templates. It seems to work, but
now my application is always sending a pdf, even when I want a simple
HTMl page.
Here's what I did:
1. Installed plugin
2. created a template: index.rfpdf in my view folder
3. here's what my base controller looks like:
def index
@clients = sort(@clients.find(:all, :order => 'lastname'))
respond_to do |format|
format.html
format.xml { render :xml => @clients.to_xml }
end
end
When accessing localhost:3000/clients my browser always want to
download an pdf. In my opinion this should still access the simple
html output (there even is NO word about generating a PDF in the
controller... really weird).
Regards,
tisp
Naming a file index.rfpdf is causing the confusion. It would probably
be best to name it something else.