<%# locals: (accounts:) %> <% accounts.group_by(&:accountable_type).sort_by { |group, _| group }.each do |group, accounts| %>

<%= Accountable.from_type(group).display_name %>

·

<%= accounts.count %>

<% unless accounts.any?(&:syncing?) %>

<%= totals_by_currency(collection: accounts, money_method: :balance_money) %>

<% end %>
<% accounts.each_with_index do |account, index| %> <%= render account %> <% unless index == accounts.count - 1 %> <%= render "shared/ruler" %> <% end %> <% end %>
<% end %>