Another partial fix for issue #2824, which also affected ip bans and feedback

Also fixed minor errors with IP bans
This commit is contained in:
Type-kun
2017-01-09 13:57:16 +05:00
parent c44c40c759
commit 9da5e67a65
6 changed files with 12 additions and 12 deletions

View File

@@ -20,10 +20,10 @@ class ForumPost < ActiveRecord::Base
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
ModAction.log("#{CurrentUser.name} updated forum post ##{self.id}")
ModAction.log("#{CurrentUser.name} updated forum post ##{id}")
end
after_destroy(:if => lambda {|rec| rec.updater_id != rec.creator_id}) do
ModAction.log("#{CurrentUser.name} deleted forum post ##{self.id}")
ModAction.log("#{CurrentUser.name} deleted forum post ##{id}")
end
mentionable(
:message_field => :body,