diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-09-07 09:21:38 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-09-07 09:21:38 +0200 |
commit | e5f934ddf0aa4ef9efbf45751bc00bebff768d99 (patch) | |
tree | 322231d7d50704edf8da762b69ee22c9850f2ce3 /app/serializers/rest | |
parent | d967251fdc3826ad27d30e55258cfa4cdfd7c871 (diff) | |
parent | a6121a159c5305ea9faa95743a50babb23ab41cd (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/activitypub/collections_controller.rb`: Conflict caused because we have additional code to make sure pinned local-only toots don't get rendered on the ActivityPub endpoints. Ported upstream changes.
Diffstat (limited to 'app/serializers/rest')
-rw-r--r-- | app/serializers/rest/account_featured_tag_serializer.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/serializers/rest/account_featured_tag_serializer.rb b/app/serializers/rest/account_featured_tag_serializer.rb new file mode 100644 index 000000000..d8d5fd68c --- /dev/null +++ b/app/serializers/rest/account_featured_tag_serializer.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class REST::AccountFeaturedTagSerializer < ActiveModel::Serializer + include RoutingHelper + + attributes :id, :name, :url + + def id + object.tag.id.to_s + end + + def name + "##{object.name}" + end + + def url + short_account_tag_url(object.account, object.tag) + end +end |