Open dblock opened 9 months ago
total = 0
Team.no_timeout.active.each do |team|
next unless team.activities.unbragged.any?
puts "#{team}"
team.users.each do |user|
next unless user.activities.unbragged.any?
puts " #{user}: #{user.activities.unbragged.count}"
total += user.activities.unbragged.count
end
team.clubs.each do |club|
next unless club.activities.unbragged.any?
puts " club_id=#{club.strava_id}, name=#{club.name}: #{club.activities.unbragged.count}"
total += club.activities.unbragged.count
end
end; puts "total=#{total}"; nil
Also related, https://github.com/dblock/slack-strava/issues/134.