add text representation of statuses to status serializer

staging
multiple creatures 2019-07-15 13:59:22 -05:00
parent 07013fba48
commit 6b72e8a4df
1 changed files with 4 additions and 0 deletions

View File

@ -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