ujh/fountainpencompanion

View on GitHub
app/views/pages/inks_by_popularity.html.slim

Summary

Maintainability
Test Coverage
- content_for :title, "Inks by popularity"
- content_for :subtitle do
  ' Based on
  = number_to_percentage(AdminStats.new.collected_inks_with_macro_cluster_percentage, precision: 2)
  |  percent of the data


- content_for :breadcrumbs
  ol class="breadcrumb"
    li class="breadcrumb-item"
      = link_to "Leaderboards", page_path("leaderboards")
    li class="breadcrumb-item active" aria-current="page"
      | Inks by popularity

ol class="fpc-leaderboard"
  - LeaderBoard.inks_by_popularity.each do |macro_cluster|
    li
      - if macro_cluster.brand_cluster
        = link_to macro_cluster.name, brand_ink_path(macro_cluster.brand_cluster, macro_cluster)
      - else
        = macro_cluster.name
      = " (#{macro_cluster.ci_count})"