I followed this nice post to set rendering of shared partials across Phoenix application up. Now I must be doing something obviously erroneous because whenever I try to render any of the shared templates I get
protocol String.Chars not implemented for {:safe, ["<span>test</span>\n"]} of type Tuple
The template in question is a minimalistic
<span>test</span>
testing.html.eex
file. The rendering function follows the pattern from the above article and looks as follows:
def render_shared(template, assigns \\ []) do
render(XmodeWeb.IconsView, "#{template}.html", assigns)
end
The only difference is the automatic “.html” but removing it doesn’t change anything. Would be grateful for pointing me in the right direction.