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 26dc587 commit aac9724Copy full SHA for aac9724
app/controllers/stats_controller.rb
@@ -115,6 +115,7 @@ def show
115
Prefecture.order(:id).each do |p|
116
@data_by_prefecture[p.name] = Dojo.active.where(prefecture_id: p.id).sum(:counter)
117
end
118
+ @data_by_prefecture_count = @data_by_prefecture.select{|k,v| v>0}.count
119
120
121
app/views/stats/show.html.haml
@@ -225,6 +225,8 @@
225
%a{href: '#prefectures'}<
226
✅
227
都道府県別の道場数
228
+ %div{style: 'padding-top: 10px; font-size: smaller;'}
229
+ = "(#{@data_by_prefecture_count} / #{Prefecture.count})"
230
%div{style: "margin-top: 20px;", align: 'center' }
231
%table{border: '1'}
232
%tr
0 commit comments