<% @collections.each do |collection, collectables| %> <% if collectables.size > 0 %>
<%= collection_name(collection.pluralize) %>
    <% collectables.each do |collectable, stat| %>
  • <%= link_to(polymorphic_path(collectable), class: 'unstyled d-flex align-items-center') do %> <%= generic_sprite(collection, collectable) %> <% if collection == 'titles' %> <%= title_name(collectable.title) %> <% else %> <%= collectable.name %> <% end %> <% if stat.present? %>
    (<%= stat %>) <% end %>
    <% end %>
  • <% end %>
<% end %> <% end %>