2013-08-14 11:05:53 -04:00
|
|
|
class ScreenedEmailSerializer < ApplicationSerializer
|
2013-08-01 21:30:13 -04:00
|
|
|
attributes :email,
|
|
|
|
:action,
|
|
|
|
:match_count,
|
|
|
|
:last_match_at,
|
2013-08-22 19:04:17 -04:00
|
|
|
:created_at,
|
|
|
|
:ip_address
|
2013-08-14 11:05:53 -04:00
|
|
|
|
2013-08-01 21:30:13 -04:00
|
|
|
def action
|
2013-08-14 11:05:53 -04:00
|
|
|
ScreenedEmail.actions.key(object.action_type).to_s
|
2013-08-01 21:30:13 -04:00
|
|
|
end
|
2013-11-05 15:00:47 -05:00
|
|
|
|
|
|
|
def ip_address
|
|
|
|
object.ip_address.try(:to_s)
|
|
|
|
end
|
|
|
|
|
2013-08-01 21:30:13 -04:00
|
|
|
end
|