In Rails we’re able to use
<% if info %>, however in Phoenix we don’t have that option, in the phoenix channel on Slack a guy pointed me to http://stackoverflow.com/questions/34068589/elixir-phoenix-flash-messages-do-not-show-up however it doesn’t work either, creating a file in /web/templates/layout/alert.html.eex with the content provided in the example throws an error:
Compiling 1 file (.ex)
== Compilation error on file web/views/layout_view.ex ==
** (CompileError) web/templates/layout/alert.html.eex:1: undefined function info/0
(stdlib) lists.erl:1338: :lists.foreach/2
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
(elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
What is the way to do it correctly?






















