blob: 157f543aef716a9d413e13ed2e3f4f18cdc4ce5a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
# frozen_string_literal: true
class REST::SearchSerializer < ActiveModel::Serializer
attributes :hashtags
has_many :accounts, serializer: REST::AccountSerializer
has_many :statuses, serializer: REST::StatusSerializer
def hashtags
object.hashtags.map(&:name)
end
end
|