I'm porting an application to Rails 3.
We're an e-commerce site and naturally we send copies of tax invoices by email. We use plain text, so a .text.erb
seems logical.
We also display invoices in an area of the user profile, inside <pre></pre>
tags. Is there are way I can share a partial between plain text mailer templates, and views in HTML? If I try to render "shared/invoice"
inside my HTML ERB template, it says the partial doesn't exist, and that's because it's a .text.erb
partial.
What are my options, without duplicating code?