ActionMailer integration breaks render :partial
huerlisi opened this issue · comments
Simon Hürlimann commented
At least when using something like:
attachment "application/pdf" do |pdf| prawnto :prawn => { :page_size => 'A5' } pdf.filename = a_case.pdf_name pdf.body = render(:file => 'cases/show.pdf.prawn', :body => { :case => a_case}) end
This is when the show.pdf.prawn is from cases/ which is the view directory from some ActionControler, but the ActionMailer class is called CaseMailer.
The actual error:
ActionView::TemplateError (Missing template cases/_patient_address.erb in view path app/views) on line #22 of app/views/cases/show.pdf.prawn: [...] 22: render :partial => 'cases/patient_address', :locals => {:parent_pdf => pdf}