6
7
8
9
10
11
12
13
|
# File 'app/jobs/decidim/participatory_documents/export_my_suggestions_job.rb', line 6
def perform(user, document, format)
export_manifest = document.component.manifest.export_manifests.find { |manifest| manifest.name == :suggestions }
collection = export_manifest.collection.call(document.component, user, :my_suggestions)
export_data = Decidim::Exporters.find_exporter(format).new(collection, MySuggestionSerializer).export
ExportMailer.export(user, :suggestions, export_data).deliver_now
end
|