You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now view rendering uses Phoenix.View.render_existing which is ok except that it can make it easy to think you're sending an email with both formats, but in reality you had a typo in a template name and you only send a text or html version. Instead I think this should be more explicit so you get more immediate and helpful feedback.
Right now you do: render("template_name") which will render a text or html template if it exists
Instead I think it should be render("template_name.html") and render("template_name.text") if you have just one type of template to send.
If you want to send text and html then you would do render(:template_name) and it will render both and raise if either one is missing.
The text was updated successfully, but these errors were encountered:
paulcsmith
changed the title
More explicit phoenix view rendering
More explicit phoenix template rendering
Jan 23, 2016
Right now view rendering uses Phoenix.View.render_existing which is ok except that it can make it easy to think you're sending an email with both formats, but in reality you had a typo in a template name and you only send a text or html version. Instead I think this should be more explicit so you get more immediate and helpful feedback.
Right now you do:
render("template_name")
which will render a text or html template if it existsInstead I think it should be
render("template_name.html")
andrender("template_name.text")
if you have just one type of template to send.If you want to send text and html then you would do
render(:template_name)
and it will render both and raise if either one is missing.The text was updated successfully, but these errors were encountered: