Sha256: ac114ef10d7e573df1542195e9b6a0d8c596f313e62bbfa69ef210b26c90d132
Contents?: true
Size: 753 Bytes
Versions: 8
Compression:
Stored size: 753 Bytes
Contents
# frozen_string_literal: true module Decidim module DecidimAwesome class ExportAdminActionsJob < ApplicationJob queue_as :default def perform(current_user, format, collection_ids) collection = serialized_collection(collection_ids) export_data = Exporters.find_exporter(format).new(collection).export ExportMailer.export(current_user, "admin_actions", export_data).deliver_now end private def serialized_collection(collection_ids) @serialized_collection ||= begin collection = PaperTrailVersion.where(id: collection_ids) collection.map do |item| PaperTrailVersionSerializer.new(item).serialize end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems