about summary refs log tree commit diff
path: root/app/serializers/rest/filter_result_serializer.rb
blob: 54ead2f1f14e9767a429aa249e3a5f3e4e6ff9aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

class REST::FilterResultSerializer < ActiveModel::Serializer
  belongs_to :filter, serializer: REST::FilterSerializer
  has_many :keyword_matches
  has_many :status_matches

  def status_matches
    object.status_matches&.map(&:to_s)
  end
end