Adjust minimum reaction count on follower suggestion
This commit is contained in:
parent
ccbbe334fe
commit
7fab7e99f1
1 changed files with 6 additions and 2 deletions
|
|
@ -33,7 +33,7 @@ class UserFollowSuggester
|
|||
Article.
|
||||
tagged_with(user.decorate.cached_followed_tag_names, any: true).
|
||||
where(published: true).
|
||||
where("positive_reactions_count > ?", 1).pluck(:user_id).
|
||||
where("positive_reactions_count > ?", article).pluck(:user_id).
|
||||
each_with_object(Hash.new(0)) { |value, counts| counts[value] += 1 }.
|
||||
sort_by { |_key, value| value }.
|
||||
map { |arr| arr[0] }
|
||||
|
|
@ -42,4 +42,8 @@ class UserFollowSuggester
|
|||
def offset_number
|
||||
Rails.env.production? ? 250 : 0
|
||||
end
|
||||
end
|
||||
|
||||
def article
|
||||
Rails.env.production? ? 15 : 0
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue