Class: ScreenedUrlSerializer

Inherits:
ApplicationSerializer show all
Defined in:
app/serializers/screened_url_serializer.rb

Instance Method Summary collapse

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#actionObject



6
7
8
# File 'app/serializers/screened_url_serializer.rb', line 6

def action
  ScreenedUrl.actions.key(object.action_type).to_s
end

#ip_addressObject



10
11
12
# File 'app/serializers/screened_url_serializer.rb', line 10

def ip_address
  object.ip_address.try(:to_s)
end