Class: Decidim::DecidimAwesome::ExportAdminActionsJob

Inherits:
ApplicationJob
  • Object
show all
Includes:
PrivateDownloadHelper
Defined in:
app/jobs/decidim/decidim_awesome/export_admin_actions_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(current_user, format, collection_ids) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'app/jobs/decidim/decidim_awesome/export_admin_actions_job.rb', line 10

def perform(current_user, format, collection_ids)
  collection = serialized_collection(collection_ids)

  export_data = Decidim::Exporters.find_exporter(format).new(collection).export

  private_export = attach_archive(export_data, "admin_actions", current_user)

  ExportMailer.export(current_user, private_export).deliver_now
end