Replace Hash#keys.each with Hash#each_key for some perf boost

This commit is contained in:
Tan Le
2015-04-18 21:53:53 +10:00
parent d16df04c76
commit 9fbc763902
12 changed files with 15 additions and 15 deletions

View File

@@ -33,7 +33,7 @@ class ScoreCalculator
def update_posts_score(min_topic_age)
components = []
@weightings.keys.each { |k| components << "COALESCE(#{k}, 0) * :#{k}" }
@weightings.each_key { |k| components << "COALESCE(#{k}, 0) * :#{k}" }
components = components.join(" + ")
builder = SqlBuilder.new(