internetee/registry

View on GitHub
app/views/application/_flash_messages.html.erb

Summary

Maintainability
Test Coverage
<% display = (flash[:notice] || flash[:alert] || flash[:warning]) ? 'block' : 'none' %>
<div id="flash" style="display: <%= display %>;">
    <!-- Used by Mobile-ID login -->
    <% type = (flash[:notice]) ? 'bg-success' : 'bg-danger' %>
    <% type = 'bg-warning' if flash[:warning] %>
    <div class="<%= type %> alert<%= ' alert-info' if flash[:notice].present? %>">
        <%= flash[:notice] || flash[:alert] || flash[:warning] %>
    </div>
</div>