add text representation of statuses to status serializer
parent
07013fba48
commit
6b72e8a4df
|
@ -72,6 +72,10 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
||||||
Formatter.instance.format(object)
|
Formatter.instance.format(object)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def text
|
||||||
|
"#{object.proper.text}\n\n#{object.tags.pluck(:name).sort.map{ |t| "##{t}" }.join(' ')}"
|
||||||
|
end
|
||||||
|
|
||||||
def url
|
def url
|
||||||
TagManager.instance.url_for(object)
|
TagManager.instance.url_for(object)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue