Make basic posts query rely on SitConfig value

This commit is contained in:
benhalpern 2020-10-21 08:11:54 -04:00
parent ae67e17678
commit 3126e508f7

View file

@ -239,7 +239,7 @@ module Articles
def globally_hot_articles(user_signed_in)
hot_stories = published_articles_by_tag
.where("score > ? OR featured = ?", 7, true)
.where("score > ? OR featured = ?", SiteConfig.home_feed_minimum_score, true)
.order(hotness_score: :desc)
featured_story = hot_stories.where.not(main_image: nil).first
if user_signed_in