From 66bfcc17a4c2b1c99707d79b25f2f3a661e0a3d0 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Thu, 13 Feb 2020 16:24:20 -0600 Subject: invalidate cached status after a moderator changes sensitivity flags --- app/models/form/status_batch.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models') diff --git a/app/models/form/status_batch.rb b/app/models/form/status_batch.rb index ceae06023..9d1d289de 100644 --- a/app/models/form/status_batch.rb +++ b/app/models/form/status_batch.rb @@ -22,6 +22,7 @@ class Form::StatusBatch Status.where(id: status_ids).reorder(nil).find_each do |status| status.update!(sensitive: sensitive) log_action :update, status + Rails.cache.delete("statuses/#{status.id}") end end -- cgit