Module: Federails::ActorEntity
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/federails/actor_entity.rb
Overview
Concern to include in models that acts as actors.
Actors can be anything; they authors content via their outbox and receive content in their inbox. Actors can follow and be followed by each other
By default, when an entry is created on models using this concern, a local ‘Federails::Actor` will be created.
See also:
- https://www.w3.org/TR/activitypub/#actor-objects
## Usage
Include the concern in an existing model:
“‘rb class User < ApplicationRecord
include Federails::ActorEntity
acts_as_federails_actor
end “‘
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#to_activitypub_object ⇒ Object
Add custom data to actor responses.
Instance Method Details
#to_activitypub_object ⇒ Object
Add custom data to actor responses.
Override in your own model to add extra data, which will be merged into the actor response generated by Federails. You can include extra ‘@context` for activitypub extensions and it will be merged with the main response context.
141 142 143 |
# File 'app/models/concerns/federails/actor_entity.rb', line 141 def to_activitypub_object {} end |