I am trying to display flash messages in a Phoenix app, but they do not seem to be displayed. I tried many different things, one of them:
<div class="row">
<div class="col-sm-12">
<%
info = get_flash(@conn, :info)
error = get_flash(@conn, :error)
%>
<% if info do %>
<div class="alert alert-info" role="alert"><%= info %></div>
<% end %>
<% if error do %>
<div class="alert alert-danger" role="alert"><%= error %></div>
<% end %>
</div>
</div>
Can someone point me to the correct code?
source
share