lib/mihari/serializers/alert.rb in mihari-3.5.0 vs lib/mihari/serializers/alert.rb in mihari-3.6.0

- old
+ new

@@ -1,12 +1,14 @@ # frozen_string_literal: true require "active_model_serializers" module Mihari - class AlertSerializer < ActiveModel::Serializer - attributes :id, :title, :description, :source, :created_at + module Serializers + class AlertSerializer < ActiveModel::Serializer + attributes :id, :title, :description, :source, :created_at - has_many :artifacts - has_many :tags, through: :taggings + has_many :artifacts, serializer: ArtifactSerializer + has_many :tags, through: :taggings, serializer: TagSerializer + end end end