From cbf8d76d94cfc7f23a799f2e89f23c52f2fd0e6a Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Fri, 16 Nov 2018 18:16:33 -0500 Subject: [PATCH] Add score minimum to a couple missing places (#1133) --- app/controllers/stories_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/stories_controller.rb b/app/controllers/stories_controller.rb index 6fdd463ed..e73d77e9a 100644 --- a/app/controllers/stories_controller.rb +++ b/app/controllers/stories_controller.rb @@ -113,7 +113,7 @@ class StoriesController < ApplicationController @featured_story = @stories.where.not(main_image: nil).first&.decorate || Article.new elsif params[:timeframe] == "latest" @stories = @stories.order("published_at DESC"). - where("featured_number > ?", 1449999999) + where("featured_number > ? AND score > ?", 1449999999, -40) @featured_story = Article.new else @default_home_feed = true @@ -258,7 +258,7 @@ class StoriesController < ApplicationController @stories.where("published_at > ?", Timeframer.new(params[:timeframe]).datetime). order("positive_reactions_count DESC") elsif params[:timeframe] == "latest" - @stories.order("published_at DESC") + @stories.where("score > ?", -40).order("published_at DESC") else @stories.order("hotness_score DESC") end