Sha256: 1f57089f5293c4a42c30bb90e4b47c9c03af5afeca61f64d64ea3cfc97cf5386
Contents?: true
Size: 603 Bytes
Versions: 31
Compression:
Stored size: 603 Bytes
Contents
# frozen_string_literal: true module Decidim class ExportJob < ApplicationJob queue_as :exports def perform(user, component, name, format, resource_id = nil) export_manifest = component.manifest.export_manifests.find do |manifest| manifest.name == name.to_sym end collection = export_manifest.collection.call(component, user, resource_id) serializer = export_manifest.serializer export_data = Decidim::Exporters.find_exporter(format).new(collection, serializer).export ExportMailer.export(user, name, export_data).deliver_now end end end
Version data entries
31 entries across 31 versions & 1 rubygems