Fix Performance/Sum cop (#24788)

This commit is contained in:
Matt Jankowski
2023-05-02 10:10:40 -04:00
committed by GitHub
parent 41eb49b984
commit 5e060e1f44
4 changed files with 3 additions and 11 deletions

View File

@@ -11,7 +11,7 @@ class Trends::History
end
def uses
with_redis { |redis| redis.mget(*@days.map { |day| day.key_for(:uses) }).map(&:to_i).sum }
with_redis { |redis| redis.mget(*@days.map { |day| day.key_for(:uses) }).sum(&:to_i) }
end
def accounts