You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
296 B

  1. # frozen_string_literal: true
  2. class ActivityPub::ImageSerializer < ActiveModel::Serializer
  3. include RoutingHelper
  4. attributes :type, :media_type, :url
  5. def type
  6. 'Image'
  7. end
  8. def url
  9. full_asset_url(object.url(:original))
  10. end
  11. def media_type
  12. object.content_type
  13. end
  14. end