From 7285b55aaf9237a3bdfb6f39d5c14ed0805733a3 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Fri, 6 Dec 2019 18:15:43 -0500 Subject: [PATCH] Add under-article article boxes (#5031) [deploy] --- app/views/articles/show.html.erb | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index 7a439dbb0..946d28db4 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -186,20 +186,18 @@ <%= render "articles/org_branding", organization: @organization %> <%= render "articles/full_comment_area" %> - <% unless Rails.env.production? %> - <% cache("article-bottom-content-#{@article.id}", expires_in: 18.hours) do %> - <% @classic_article = Suggester::Articles::Classic.new(@article, not_ids: [@article.id]).get.first %> - <% if @classic_article %> - <%= render "additional_content_boxes/article_box", - article: @classic_article, - classification: "classic", - classification_text: "Classic DEV Post from #{@classic_article.readable_publish_date}", - follow_cue: "Follow @#{@classic_article.user.username} to see more of their posts in your feed." %> - <% end %> -
- <% suggested_articles = ArticleSuggester.new(@article).articles(max: 4) %> - <%= render "articles/bottom_content", articles: suggested_articles %> + <% cache("article-bottom-content-#{@article.id}", expires_in: 18.hours) do %> + <% @classic_article = Suggester::Articles::Classic.new(@article, not_ids: [@article.id]).get.first %> + <% if @classic_article %> + <%= render "additional_content_boxes/article_box", + article: @classic_article, + classification: "classic", + classification_text: "Classic DEV Post from #{@classic_article.readable_publish_date}", + follow_cue: "Follow @#{@classic_article.user.username} to see more of their posts in your feed." %> <% end %> +
+ <% suggested_articles = ArticleSuggester.new(@article).articles(max: 4) %> + <%= render "articles/bottom_content", articles: suggested_articles %> <% end %>