Avalanche Game prototype. Built with Rails.

_mission_alert_badge.html.erb 304B

    <% @alert = 0 %> <% mission.mission_agents.each do |agent|%> <% agent.mission_agent_steps.each do |step| %> <% if step.status == "Waiting Validation" %> <% @alert = @alert + 1 %> <% end%> <% end %> <% end %> <% if @alert > 0 %> <span class="badge badge-warning"><%= @alert %></span> <% end %>