app/views/activities/_activity.html.erb
<% male_leader_result = activity.leader_result %>
<% female_leader_result = activity.leader_result(male: false) %>
<tr id="<%= dom_id activity %>">
<td><%= link_to l(activity.date), activity %></td>
<td><%= link_to activity.event_name, event_path(activity.event.code_name) %></td>
<td class="text-center"><%= @results_count[activity.id] %></td>
<td class="text-center"><%= @volunteers_count.fetch(activity.id, 0) %></td>
<td><%= male_leader_result&.athlete&.name %></td>
<td class="ps-0" sort_by="<%= male_leader_result&.total_time&.to_i %>">
<%= human_result_time(male_leader_result&.total_time) %>
</td>
<td><%= female_leader_result&.athlete&.name %></td>
<td class="ps-0" sort_by="<%= female_leader_result&.total_time&.to_i %>">
<%= human_result_time(female_leader_result&.total_time) %>
</td>
</tr>