dikaio
10/16/2015 - 6:38 AM

Conditional Flash - Phoenix Web Framework

Conditional Flash - Phoenix Web Framework

<%= if get_flash(@conn, :info) do %>
  <p class="alert alert-success" role="alert"><%= get_flash(@conn, :info) %></p>
<% end %>
<%= if get_flash(@conn, :error) do %>
  <p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
<% end %>