about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-13 16:24:20 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-13 16:24:20 -0600
commit66bfcc17a4c2b1c99707d79b25f2f3a661e0a3d0 (patch)
tree82afe67af5cd622a4982fcd56e42ecc2756031f7 /app/models
parent38c88fd8e84aed59a151126efb2139b6d34a3d36 (diff)
invalidate cached status after a moderator changes sensitivity flags
Diffstat (limited to 'app/models')
-rw-r--r--app/models/form/status_batch.rb1
1 files changed, 1 insertions, 0 deletions
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