[deploy] Remove unneeded eager load (#10168)
This commit is contained in:
parent
83d44401f5
commit
7f928555a5
2 changed files with 1 additions and 3 deletions
|
|
@ -22,7 +22,6 @@ class StickyArticleCollection
|
|||
|
||||
def tag_articles
|
||||
@tag_articles ||= Article.published.tagged_with(article_tags, any: true)
|
||||
.includes(:user)
|
||||
.where("public_reactions_count > ? OR comments_count > ?", reaction_count_num, comment_count_num)
|
||||
.where.not(id: article.id).where.not(user_id: article.user_id)
|
||||
.where("featured_number > ?", 5.days.ago.to_i)
|
||||
|
|
@ -34,7 +33,6 @@ class StickyArticleCollection
|
|||
return [] if tag_articles.size > 6
|
||||
|
||||
Article.published.tagged_with(%w[career productivity discuss explainlikeimfive], any: true)
|
||||
.includes(:user)
|
||||
.where("comments_count > ?", comment_count_num)
|
||||
.where.not(id: article.id).where.not(user_id: article.user_id)
|
||||
.where("featured_number > ?", 5.days.ago.to_i)
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
<% @sticky_articles.each_with_index do |article, index| %>
|
||||
<a class="crayons-link crayons-link--contentful flex" href="<%= article.path %>">
|
||||
<span class="crayons-avatar mr-2 shrink-0">
|
||||
<img src="<%= ProfileImage.new(article.user).get(width: 90) %>" class="crayons-avatar__image" loading="lazy" alt="<%= article.user.name %> profile image">
|
||||
<img src="<%= ProfileImage.new(article.cached_user).get(width: 90) %>" class="crayons-avatar__image" loading="lazy" alt="<%= article.cached_user.name %> profile image">
|
||||
</span>
|
||||
<div>
|
||||
<%= article.title %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue