about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-08-27 20:56:47 +0200
committerGitHub <noreply@github.com>2022-08-27 20:56:47 +0200
commitb399d79545e5e5430cb9d6a2c936efc244b69a75 (patch)
tree8a94c88f64223803aa1d9ea5bf15437229122dbe /app/models
parentff19dad5a05dba689122b0427886c8375491571a (diff)
Add admin API for managing IP blocks (#19065)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ip_block.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ip_block.rb b/app/models/ip_block.rb
index f40c8a0b1..8666f4248 100644
--- a/app/models/ip_block.rb
+++ b/app/models/ip_block.rb
@@ -16,6 +16,7 @@ class IpBlock < ApplicationRecord
   CACHE_KEY = 'blocked_ips'
 
   include Expireable
+  include Paginable
 
   enum severity: {
     sign_up_requires_approval: 5000,
@@ -28,7 +29,7 @@ class IpBlock < ApplicationRecord
   after_commit :reset_cache
 
   def to_log_human_identifier
-    "#{record.ip}/#{record.ip.prefix}"
+    "#{ip}/#{ip.prefix}"
   end
 
   class << self