Class: Creator
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Creator
- Includes:
- CaberObject, Commentable, FaspClient::DataSharing::Lifecycle, Followable, Indexable, Linkable, PublicIDable, Sluggable, Talkative
- Defined in:
- app/models/creator.rb
Constant Summary
Constants included from Talkative
Constants included from FederailsCommon
FederailsCommon::FEDIVERSE_USERNAMES
Constants inherited from ApplicationRecord
ApplicationRecord::SAFE_NAME_LENGTH
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Indexable
#ai_indexable?, #indexable?, #inherited_ai_indexable?, #inherited_indexable?, #public_and_indexable?
Methods included from CaberObject
#just_became_public?, #matching_permission_preset, #owners, #private?, #public?, #set_default_permission_preset, #set_owner, #set_permissions_from_preset, #will_be_public?
Methods included from Talkative
Methods included from Followable
Methods included from FederailsCommon
#federails_actor, #local?, #remote?
Class Method Details
.find_param(param) ⇒ Object
44 45 46 |
# File 'app/models/creator.rb', line 44 def self.find_param(param) find_by!(slug: param) end |
Instance Method Details
#fasp_uri ⇒ Object
32 33 34 |
# File 'app/models/creator.rb', line 32 def fasp_uri federails_actor&.federated_url end |
#name_with_domain ⇒ Object
36 37 38 |
# File 'app/models/creator.rb', line 36 def name_with_domain remote? ? name + " (#{federails_actor.server})" : name end |
#to_activitypub_object ⇒ Object
48 49 50 |
# File 'app/models/creator.rb', line 48 def to_activitypub_object ActivityPub::CreatorSerializer.new(self).serialize end |
#to_param ⇒ Object
40 41 42 |
# File 'app/models/creator.rb', line 40 def to_param slug end |