Skip to content

Commit 944cff2

Browse files
committed
Get only measurable dojos in Stats
1 parent 9ef98a8 commit 944cff2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/static_pages_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def stats
2020
@range = 2012..2017
2121
@range.each do |year|
2222
@dojos[year] =
23-
Dojo.where(created_at:
24-
Time.zone.local(2012).beginning_of_year..Time.zone.local(year).end_of_year).count
23+
Dojo.where(created_at: Time.zone.local(2012).beginning_of_year..Time.zone.local(year)
24+
.end_of_year).select{|d| d.dojo_event_services.any?}.count
2525
@events[year] =
2626
EventHistory.where(evented_at:
2727
Time.zone.local(year).beginning_of_year..Time.zone.local(year).end_of_year).count

0 commit comments

Comments
 (0)