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

@@ -12,11 +12,11 @@ class Comment < ActiveRecord::Base
before_validation :initialize_updater
after_create :update_last_commented_at_on_create
after_update(:if => lambda {|rec| CurrentUser.id != rec.creator_id}) do
ModAction.log("comment ##{self.id} updated by #{CurrentUser.name}")
ModAction.log("comment ##{id} updated by #{CurrentUser.name}")
end
after_destroy :update_last_commented_at_on_destroy
after_destroy(:if => lambda {|rec| CurrentUser.id != rec.creator_id}) do
ModAction.log("comment ##{self.id} deleted by #{CurrentUser.name}")
ModAction.log("comment ##{id} deleted by #{CurrentUser.name}")
end
attr_accessible :body, :post_id, :do_not_bump_post, :is_deleted, :as => [:member, :gold, :platinum, :builder, :janitor, :moderator, :admin]
attr_accessible :is_sticky, :as => [:moderator, :admin]