How to use “Phoenix.View.render_to_string(…)” with text - non-html - templates?
Is there an alternative specifically for text templates ?
How to use “Phoenix.View.render_to_string(…)” with text - non-html - templates?
Is there an alternative specifically for text templates ?
AFAIK that function is not specific to HTML…
That’s not true.
Then please tell us what you have tried.
Phoenix uses some heuristics to choose the proper template when render*
is called to find the actual template.
But render_to_string(module, "foo.txt", assigns)
should work pretty well.