Read more

Use the same template for multiple ActionMailer actions

Henning Koch
September 07, 2010Software engineer at makandra GmbH

One option is to use partials. Or you can set the @template field to the name of another action:

class Mailer < ActionMailer::Base
  def foo
    subject "Hello World"
  end
  
  def bar
    subject "Hello Universe"
    @template = 'foo'
  end
end
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot
Posted by Henning Koch to makandra dev (2010-09-07 10:13)