Add missing instance var for /manage & Bust rails cache on comments (#3004)

This commit is contained in:
Jess Lee 2019-05-30 12:23:20 -04:00 committed by Mac Siri
parent 8c52d5c43f
commit c3e2a0c5f1
2 changed files with 2 additions and 0 deletions

View file

@ -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

View file

@ -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|