We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8eb747d commit 46abf24Copy full SHA for 46abf24
app/models/rollups/daily_geo.rb
@@ -1,3 +1,15 @@
1
class Rollups::DailyGeo < ActiveRecord::Base
2
establish_connection :clickhouse
3
+
4
+ def country
5
+ ISO3166::Country[country_code] || "Other"
6
+ end
7
8
+ def country_label
9
+ if country_code == "Other"
10
+ "Other"
11
+ else
12
+ country.iso_short_name
13
14
15
end
app/views/metrics/_countries_card.html.erb
@@ -2,7 +2,7 @@
<ul class="list-group list-group-flush position-relative">
<% countries.map do |country| %>
<li class="list-group-item d-flex justify-content-between">
- <span class="z-1"><%= country[:country_code] %></span>
+ <span class="z-1"><%= country.country_label %></span>
<span class="z-1"><%= number_with_delimiter(country[:count]) || 0 %></span>
</li>
<% end %>
0 commit comments