ruby on rails - Including a .text.erb partial in a .html.erb template? (Invoice) -



ruby on rails - Including a .text.erb partial in a .html.erb template? (Invoice) -

i'm porting application rails 3.

we're e-commerce site , naturally send copies of taxation invoices email. utilize plain text, .text.erb seems logical.

we display invoices in area of user profile, within <pre></pre> tags. there way can share partial between plain text mailer templates, , views in html? if seek render "shared/invoice" within html erb template, says partial doesn't exist, , that's because it's .text.erb partial.

what options, without duplicating code?

i haven't tried in rails 3, in rails 2 specify format of partial. might worth giving go on rails 3.

render :partial => "shared/invoice.text.erb"

ruby-on-rails partial erb invoice

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -