A Mail template. Set any variables you would like to use in your mail template and just provide a .htmlx file.
template.name = "gmosx" template.hello = "world" template.render("mail.htmlx")
mail.htmlx:
Hello #{name}, This is the hello variable: #{hello}
The interpolated result:
Hello gmosx, This is the hello variable: world
Methods
Public Instance methods
[ show source ]
# File lib/nitro/mailer/template.rb, line 26
26: def render(template)
27: filter = TemplateFilter.new
28: code = filter.apply(File.read(template))
29: @out = ""
30: eval(code)
31: return @out
32: end