diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-15 13:59:22 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-15 14:12:24 -0500 |
commit | 6b72e8a4df28a99780b590ca891b9db20a456e4e (patch) | |
tree | 41b4a622c21a91e1037532e179cf54640b3d4d3c /app | |
parent | 07013fba488eb9b32f094dfeaf759866a3b7faf3 (diff) |
add text representation of statuses to status serializer
Diffstat (limited to 'app')
-rw-r--r-- | app/serializers/rest/status_serializer.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index a6807b3ac..64578713a 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -72,6 +72,10 @@ class REST::StatusSerializer < ActiveModel::Serializer Formatter.instance.format(object) end + def text + "#{object.proper.text}\n\n#{object.tags.pluck(:name).sort.map{ |t| "##{t}" }.join(' ')}" + end + def url TagManager.instance.url_for(object) end |