Sha256: b5c9e7aa110ef2ea5930c251a3b229fb5a7cb628455d8ed0ddb126eb5ec828c6

Contents?: true

Size: 925 Bytes

Versions: 4

Compression:

Stored size: 925 Bytes

Contents

json.set!('@context', 'https://www.w3.org/ns/activitystreams')
collection_id = @actor.followings_url
json.id collection_id
json.type 'OrderedCollectionPage'
json.totalItems @total_actors
json.first Federails::Engine.routes.url_helpers.following_server_actor_url(@actor)
json.last @actors.total_pages == 1 ? Federails::Engine.routes.url_helpers.following_server_actor_url(@actor) : Federails::Engine.routes.url_helpers.following_server_actor_url(@actor, page: @actors.total_pages)
json.current do |j|
  j.type 'OrderedCollectionPage'
  j.id @actors.current_page == 1 ? Federails::Engine.routes.url_helpers.following_server_actor_url(@actor) : Federails::Engine.routes.url_helpers.following_server_actor_url(@actor, page: @actors.current_page)
  j.partOf collection_id
  j.next @actors.next_page
  j.prev @actors.prev_page
  j.totalItems @total_actors
  j.orderedItems do
    json.array! @actors.map(&:federated_url)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
federails-0.4.0 app/views/federails/server/actors/following.activitypub.jbuilder
federails-0.3.0 app/views/federails/server/actors/following.activitypub.jbuilder
federails-0.2.0 app/views/federails/server/actors/following.activitypub.jbuilder
federails-0.1.0 app/views/federails/server/actors/following.json.jbuilder