Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

In tests there are not always ministers associated with organisations.

This should fix the build.
  • Loading branch information...
commit b44304ea62a4f6e3837ed423ef2149f49d073753 1 parent 10e6760
James Adam lazyatom authored

Showing 1 changed file with 11 additions and 9 deletions. Show diff stats Hide diff stats

  1. +11 9 app/views/organisations/show.html.erb
20 app/views/organisations/show.html.erb
@@ -13,15 +13,17 @@
13 13 </p>
14 14 </div>
15 15 <div class="g1">
16   - <section id="ministers">
17   - <%= render_list_of_ministerial_roles([@organisation.top_ministerial_role]) do |ministerial_role| %>
18   - <div class="image_holder">
19   - <%= image_for_ministerial_role(ministerial_role) %>
20   - </div>
21   - <h3><%= link_to ministerial_role.name, ministerial_role %></h3>
22   - <p class="current_appointee"><%= ministerial_role.current_person_name %></p>
23   - <% end %>
24   - </section>
  16 + <% if @organisation.ministerial_roles.any? %>
  17 + <section id="ministers">
  18 + <%= render_list_of_ministerial_roles([@organisation.top_ministerial_role]) do |ministerial_role| %>
  19 + <div class="image_holder">
  20 + <%= image_for_ministerial_role(ministerial_role) %>
  21 + </div>
  22 + <h3><%= link_to ministerial_role.name, ministerial_role %></h3>
  23 + <p class="current_appointee"><%= ministerial_role.current_person_name %></p>
  24 + <% end %>
  25 + </section>
  26 + <% end %>
25 27 </div>
26 28 </div>
27 29 <% end %>

0 comments on commit b44304e

Please sign in to comment.
Something went wrong with that request. Please try again.