Class: Para::Admin::ExportsController

Inherits:
JobsController show all
Defined in:
app/controllers/para/admin/exports_controller.rb

Instance Method Summary collapse

Methods inherited from JobsController

#show

Methods inherited from BaseController

#current_ability, #current_admin

Methods included from BaseHelper

#find_partial_for, #find_relation_name_for, #flash_message, #registered_components_options, #resource_title_for, #template_path_lookup

Methods included from Helpers::ResourceName

#resource_name

Methods inherited from Para::ApplicationController

#admin?

Instance Method Details

#createObject



8
9
10
11
12
13
14
15
16
# File 'app/controllers/para/admin/exports_controller.rb', line 8

def create
  job = @exporter.perform_later(
    model_name: @component.try(:model).try(:name),
    search: params[:q]&.permit!,
    params: params.permit(@exporter.params_whitelist).to_h
  )

  track_job(job)
end