mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
Fix [object object] being rendered where it should be an ip address
This commit is contained in:
parent
6597738322
commit
2342da893d
4 changed files with 18 additions and 0 deletions
|
@ -83,4 +83,8 @@ class AdminUserSerializer < BasicUserSerializer
|
|||
scope.can_deactivate?(object)
|
||||
end
|
||||
|
||||
def ip_address
|
||||
object.ip_address.try(:to_s)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -9,4 +9,9 @@ class ScreenedEmailSerializer < ApplicationSerializer
|
|||
def action
|
||||
ScreenedEmail.actions.key(object.action_type).to_s
|
||||
end
|
||||
|
||||
def ip_address
|
||||
object.ip_address.try(:to_s)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -10,4 +10,8 @@ class ScreenedIpAddressSerializer < ApplicationSerializer
|
|||
ScreenedIpAddress.actions.key(object.action_type).to_s
|
||||
end
|
||||
|
||||
def ip_address
|
||||
object.ip_address.try(:to_s)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -10,4 +10,9 @@ class ScreenedUrlSerializer < ApplicationSerializer
|
|||
def action
|
||||
ScreenedUrl.actions.key(object.action_type).to_s
|
||||
end
|
||||
|
||||
def ip_address
|
||||
object.ip_address.try(:to_s)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue