这就是wicked pdf的文档规定:
WickedPdf.new.pdf_from_string(
render_to_string(:pdf => "pdf_file.pdf", :template => 'templates/pdf.html.erb', :layout => 'pdfs/layout_pdf'),
:footer => {:content => render_to_string({:template => 'templates/pdf_footer.html.erb', :layout => 'pdfs/layout_pdf'})}
)
Run Code Online (Sandbox Code Playgroud)
我得到的是ActionView :: MissingTemplate即使我在目录中有pdf.html.erb.我在应用程序控制器中使用gen_pdf方法,在views/application文件夹中使用等效的pdf.html.erb.我错过了什么.