Fix [object object] being rendered where it should be an ip address

This commit is contained in:
Neil Lalonde 2013-11-05 15:00:47 -05:00
parent 6597738322
commit 2342da893d
4 changed files with 18 additions and 0 deletions

View file

@ -83,4 +83,8 @@ class AdminUserSerializer < BasicUserSerializer
scope.can_deactivate?(object)
end
def ip_address
object.ip_address.try(:to_s)
end
end

View file

@ -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

View file

@ -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

View file

@ -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