From 6b72e8a4df28a99780b590ca891b9db20a456e4e Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 15 Jul 2019 13:59:22 -0500 Subject: add text representation of statuses to status serializer --- app/serializers/rest/status_serializer.rb | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit