DRAFT: Expect updates as people who know more than I do correct me.
Among the wonderful things about Phoenix is that it doesn't render strings. Instead, it renders iodata. That's an Elixir idiom that speeds up string processing by avoiding concatenation. But it also makes it easier to work with conditional logic in views and templates. This two-post series is about how I'm doing that in a new Phoenix app (as a new Phoenix/Elixir programmer).
First, some basics
Consider a function
helper in a View module, called like this from a template:
What sort of things can