Jump to content

The ultimate community for Ruby on Rails developers.


How to Use HAML with Actionmailer in Rails 3.2.1

actionmailer HAML

  • Please log in to reply
No replies to this topic

#1 darrindickey



  • Members
  • 1 posts

Posted 28 August 2014 - 03:07 AM

We are using Rails 3.2.1 and I'm trying to find out how to use HAML for the email template (if possible). From searching around, it seems possible, but I haven't found a workable solution yet.


This is inside my load_template method:

template = File.read('path/to/template')
    haml_engine = Haml::Engine.new(template)
    output = haml_engine.render
    puts output

But I just get Haml::SyntaxError: Illegal nesting: nesting within plain text is illegal., even when the HAML file is empty.

Also tagged with one or more of these keywords: actionmailer, HAML

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users