私は同じ部分を2つの異なるページで使用しています。 最初のものは簡単です*.html.haml
、後者は*.pdf.haml
です。レール4部分拡張がpdfテンプレートの下に必要です
例:私は、ビュー/患者/レポートなどの部分的/ _invoice.html.haml
最初の使用法を持っている: -
= render partial: 'patient/reports/invoice'
二account.html.haml利用: - 請求書の下.pdf.haml
= render partial: 'patient/reports/invoice.html.haml'
なぜ後者のファイル拡張子を提供する必要がありますか?