You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
283 B

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