diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2017-06-02 17:17:24 +0200 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2017-06-02 17:17:24 +0200 |
commit | ea8381411b2db679391e25733b3d48947e55f41b (patch) | |
tree | a341626e4885551acb78a027f81b3234f39d7855 /app/presenters | |
parent | da1f5255e4e7d2c68c7f25bbad610726030c6a4d (diff) | |
download | gitlab-ce-ea8381411b2db679391e25733b3d48947e55f41b.tar.gz |
Use sum instead of map + inject
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/conversational_development_index/metric_presenter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |