From c3e2a0c5f1a03d0f782356db6b3eb52b8b015b37 Mon Sep 17 00:00:00 2001 From: Jess Lee Date: Thu, 30 May 2019 12:23:20 -0400 Subject: [PATCH] Add missing instance var for /manage & Bust rails cache on comments (#3004) --- app/controllers/articles_controller.rb | 1 + app/labor/cache_buster.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index 0be9fe74b..2d2d47fd8 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -84,6 +84,7 @@ class ArticlesController < ApplicationController @rating_vote = RatingVote.where(article_id: @article.id, user_id: @user.id).first @buffer_updates = BufferUpdate.where(composer_user_id: @user.id, article_id: @article.id) @organization = @user&.organization + @org_members = @organization.users.pluck(:name, :id) if @organization end def preview diff --git a/app/labor/cache_buster.rb b/app/labor/cache_buster.rb index 2bd2e7d50..01db93c06 100644 --- a/app/labor/cache_buster.rb +++ b/app/labor/cache_buster.rb @@ -21,6 +21,7 @@ class CacheBuster bust("/?i=i") bust("?i=i") end + commentable.touch(:last_comment_at) bust("#{commentable.path}/comments/") bust(commentable.path.to_s) commentable.comments.includes(:user).find_each do |c|