summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/conversational_development_index/idea_to_production_step.rb4
-rw-r--r--app/presenters/conversational_development_index/metric_presenter.rb2
-rw-r--r--app/views/admin/conversational_development_index/_callout.html.haml2
3 files changed, 4 insertions, 4 deletions
diff --git a/app/models/conversational_development_index/idea_to_production_step.rb b/app/models/conversational_development_index/idea_to_production_step.rb
index f53227f8a27..6e1753c9f30 100644
--- a/app/models/conversational_development_index/idea_to_production_step.rb
+++ b/app/models/conversational_development_index/idea_to_production_step.rb
@@ -9,9 +9,9 @@ module ConversationalDevelopmentIndex
end
def percentage_score
- sum = features.map do |feature|
+ sum = features.sum do |feature|
metric.percentage_score(feature)
- end.inject(:+)
+ end
sum / features.size.to_f
end
diff --git a/app/presenters/conversational_development_index/metric_presenter.rb b/app/presenters/conversational_development_index/metric_presenter.rb
index 220014a955a..bb65ba2646b 100644
--- a/app/presenters/conversational_development_index/metric_presenter.rb
+++ b/app/presenters/conversational_development_index/metric_presenter.rb
@@ -138,7 +138,7 @@ module ConversationalDevelopmentIndex
end
def average_percentage_score
- cards.map(&:percentage_score).inject(:+) / cards.size.to_f
+ cards.sum(&:percentage_score) / cards.size.to_f
end
end
end
diff --git a/app/views/admin/conversational_development_index/_callout.html.haml b/app/views/admin/conversational_development_index/_callout.html.haml
index a783b9a13a8..33a4dab1e00 100644
--- a/app/views/admin/conversational_development_index/_callout.html.haml
+++ b/app/views/admin/conversational_development_index/_callout.html.haml
@@ -8,6 +8,6 @@
%h4
Introducing Your Conversational Development Index
%p
- Your Conversational Development Index gives an overview of how you are using GitLab from a feature perspective. View how they compare with other organizations, discover features your are not using, and learn best practices through blog posts and white papers.
+ Your Conversational Development Index gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers.
.svg-container.convdev
= custom_icon('convdev_overview')