phoenix_slime
phoenix_slime copied to clipboard
Cannot render template for Bamboo
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
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?