mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Handle null language in sailors log
This commit is contained in:
@@ -53,6 +53,7 @@ class SailorsLogLeaderboard < ApplicationRecord
|
||||
|
||||
# Get most common language per project using ActiveRecord
|
||||
most_common_languages = user_heartbeats
|
||||
.where.not(language: nil)
|
||||
.group(:project, :language)
|
||||
.count
|
||||
.group_by { |k, _| k[0] } # Group by project
|
||||
|
||||
Reference in New Issue
Block a user