Remove current article author from sticky sidebar (#256)
This commit is contained in:
parent
2001963863
commit
6cf8a79c71
1 changed files with 2 additions and 2 deletions
|
|
@ -286,7 +286,7 @@ class StoriesController < ApplicationController
|
|||
includes(:user).
|
||||
where("positive_reactions_count > ? OR comments_count > ?", reaction_count_num, comment_count_num).
|
||||
where(published: true).
|
||||
where.not(id: @article.id).
|
||||
where.not(id: @article.id, user_id: @article.user_id).
|
||||
where("featured_number > ?", 5.days.ago.to_i).
|
||||
order("RANDOM()").
|
||||
limit(8)
|
||||
|
|
@ -295,7 +295,7 @@ class StoriesController < ApplicationController
|
|||
includes(:user).
|
||||
where("comments_count > ?", comment_count_num).
|
||||
where(published: true).
|
||||
where.not(id: @article.id).
|
||||
where.not(id: @article.id, user_id: @article.user_id).
|
||||
where("featured_number > ?", 5.days.ago.to_i).
|
||||
order("RANDOM()").
|
||||
limit(10 - tag_articles.size)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue