Apply Style/CollectionMethods rubocop rule
We were already using `map` and `reduce` almost everywhere.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user