phoenix_slime icon indicating copy to clipboard operation
phoenix_slime copied to clipboard

Cannot render template for Bamboo

Open dannote opened this issue 8 years ago • 1 comments

I'm trying to use Slime templates in Bamboo and here is what I get. I suppose that render_to_string expects a binary, not a safe string. Phoenix.Template.EExEngine works fine here.

Request: POST /lead/join
** (exit) an exception was raised:
    ** (ArgumentError) argument error
        :erlang.iolist_to_binary({:safe, ["" | "a"]})
        (phoenix) lib/phoenix/view.ex:342: Phoenix.View.render_to_string/3
        (bamboo) lib/bamboo/phoenix.ex:247: Bamboo.Phoenix.render_html_and_text_emails/1

dannote avatar Sep 21 '16 19:09 dannote

Thanks for the report @dannote! I haven't personally used PhoenixSlim + Bamboo, might you have a example project I can bang on? Additionally, is this something you'd be keen to try and fix?

doomspork avatar Sep 22 '16 03:09 doomspork