Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/milestones_helper.rb')
-rw-r--r--app/helpers/milestones_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb
index 999143002bb..94a030d9d57 100644
--- a/app/helpers/milestones_helper.rb
+++ b/app/helpers/milestones_helper.rb
@@ -53,6 +53,7 @@ module MilestonesHelper
# Returns count of milestones for different states
# Uses explicit hash keys as the 'opened' state URL params differs from the db value
# and we need to add the total
+ # rubocop: disable CodeReuse/ActiveRecord
def milestone_counts(milestones)
counts = milestones.reorder(nil).group(:state).count
@@ -62,6 +63,7 @@ module MilestonesHelper
all: counts.values.sum || 0
}
end
+ # rubocop: enable CodeReuse/ActiveRecord
# Show 'active' class if provided GET param matches check
# `or_blank` allows the function to return 'active' when given an empty param