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

@@ -7,10 +7,10 @@ class IpBan < ActiveRecord::Base
validates_uniqueness_of :ip_addr, :if => lambda {|rec| rec.ip_addr =~ IP_ADDR_REGEX}
attr_accessible :ip_addr, :reason
after_create do
ModAction.log("#{CurrentUser.name} created ip ban for #{rec.ip_addr}")
ModAction.log("#{CurrentUser.name} created ip ban for #{ip_addr}")
end
after_destroy do
ModAction.log("#{CurrentUser.name} deleted ip ban for ##{rec.ip_addr}")
ModAction.log("#{CurrentUser.name} deleted ip ban for #{ip_addr}")
end
def self.is_banned?(ip_addr)