Add score minimum to a couple missing places (#1133)
This commit is contained in:
parent
f744f43493
commit
cbf8d76d94
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue