From ec6c8ab1363026257fbfa8cfdf3d49609853b749 Mon Sep 17 00:00:00 2001 From: Josh Puetz Date: Fri, 19 Aug 2022 15:40:23 -0400 Subject: [PATCH] Public reactions score feed lever (#18358) --- app/models/articles/feeds.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/models/articles/feeds.rb b/app/models/articles/feeds.rb index 722b2439f..4d1ee464d 100644 --- a/app/models/articles/feeds.rb +++ b/app/models/articles/feeds.rb @@ -332,6 +332,14 @@ module Articles user_required: false, select_fragment: "articles.public_reactions_count", group_by_fragment: "articles.public_reactions_count") + + relevancy_lever(:public_reactions_score, + label: "Weight to give based on article.score (see article.update_score for this calculation - + it's a sum of the scores of reactions on an article).", + range: "[0..∞)", + user_required: false, + select_fragment: "articles.score", + group_by_fragment: "articles.score") end private_constant :LEVER_CATALOG # rubocop:enable Metrics/BlockLength