Small cached attribute fix (#2663)

* Add profile_image_90 to serialized data on article

* Cached org tweaks
This commit is contained in:
Ben Halpern 2019-05-02 16:24:49 -04:00 committed by GitHub
parent 5e64ae874e
commit 4c3a9b483e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View file

@ -1,5 +1,5 @@
<div class="container show-page-content-display"
data-details="<%= article.cached_organization&.slug %>__<%= article.slug %>"
data-details="<%= article.organization&.slug %>__<%= article.slug %>"
id="<%= classification == "boosted" ? "partner-content-display" : "classic_article_#{article.id}" %>">
<div class="content-classification">
<span class="content-classification-text"><%= classification_text %></span>

View file

@ -2,7 +2,6 @@
<% cache("fetched-home-articles-object", expires_in: 8.minutes) do %>
<% @new_stories = Article.published.
where("published_at > ? AND score > ?", rand(2..6).hours.ago, -30).
includes(:user).
limited_column_select.
order("published_at DESC").
limit(rand(15..60)).