Add category for mod actions

This commit is contained in:
BrokenEagle
2018-01-13 14:48:08 -08:00
parent b9964e97a7
commit 3c45273694
18 changed files with 92 additions and 32 deletions

View File

@@ -20,10 +20,10 @@ class ForumPost < ApplicationRecord
before_destroy :validate_topic_is_unlocked
after_save :delete_topic_if_original_post
after_update(:if => lambda {|rec| rec.updater_id != rec.creator_id}) do |rec|
ModAction.log("#{CurrentUser.name} updated forum ##{rec.id}")
ModAction.log("#{CurrentUser.name} updated forum ##{rec.id}",:forum_post_update)
end
after_destroy(:if => lambda {|rec| rec.updater_id != rec.creator_id}) do |rec|
ModAction.log("#{CurrentUser.name} deleted forum ##{rec.id}")
ModAction.log("#{CurrentUser.name} deleted forum ##{rec.id}",:forum_post_delete)
end
mentionable(
:message_field => :body,