I have a macro that renders a template like index.html.eex if it exists in the __MODULE__ that the macro is used in. Otherwise it falls back to index.html.eex in the macro:
render_existing(__MODULE__, "index.html", assigns) || render(MacroView, "index.html", assigns)
This allows some views to be customized with more code, while most views use a standard template.
After upgrading the Phoenix 1.6, render_existing is deprecated. What is the best way to conditionally render a template in __MODULE__ if it exists? It doesn’t seem like it’s possible to resolve a file path from __MODULE__






















