Apply Style/CollectionMethods rubocop rule

We were already using `map` and `reduce` almost everywhere.
This commit is contained in:
Javi Martín
2019-10-26 00:44:19 +02:00
parent e3bfcbcd25
commit eafb4018bf
27 changed files with 57 additions and 56 deletions

View File

@@ -384,7 +384,7 @@ namespace :proposal_actions do
5
]
votes_count = expected_supports.inject(0.0) { |sum, x| sum + x }
votes_count = expected_supports.reduce(0.0) { |sum, x| sum + x }
goal_votes = Setting["votes_for_proposal_success"].to_f
cached_votes_up = 0