Class: ScreenedUrlSerializer
- Inherits:
-
ApplicationSerializer
- Object
- ActiveModel::Serializer
- ApplicationSerializer
- ScreenedUrlSerializer
- 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
Instance Method Details
#action ⇒ Object
6 7 8 |
# File 'app/serializers/screened_url_serializer.rb', line 6 def action ScreenedUrl.actions.key(object.action_type).to_s end |
#ip_address ⇒ Object
10 11 12 |
# File 'app/serializers/screened_url_serializer.rb', line 10 def ip_address object.ip_address.try(:to_s) end |