diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-13 16:24:20 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-13 16:24:20 -0600 |
commit | 66bfcc17a4c2b1c99707d79b25f2f3a661e0a3d0 (patch) | |
tree | 82afe67af5cd622a4982fcd56e42ecc2756031f7 | |
parent | 38c88fd8e84aed59a151126efb2139b6d34a3d36 (diff) |
invalidate cached status after a moderator changes sensitivity flags
-rw-r--r-- | app/models/form/status_batch.rb | 1 |
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 |