add modaction helper

This commit is contained in:
Albert Yi
2017-01-03 15:04:47 -08:00
parent ad4b55c334
commit 4d698bf98b
10 changed files with 23 additions and 19 deletions

View File

@@ -12,7 +12,7 @@ module Moderator
CurrentUser.without_safe_mode do
CurrentUser.scoped(updater, updater_ip_addr) do
ModAction.create(:description => "processed mass update: #{antecedent} -> #{consequent}")
ModAction.log("processed mass update: #{antecedent} -> #{consequent}")
::Post.tag_match(antecedent).where("true /* Moderator::TagBatchChange#perform */").find_each do |post|
post.reload

View File

@@ -30,7 +30,7 @@ class UserDeletion
private
def create_mod_action
ModAction.create(:description => "user ##{user.id} deleted")
ModAction.log("user ##{user.id} deleted")
end
def clear_tag_subscriptions