Sha256: 86deab327a94165e098d0e7262a9a9d87f42750cd08ef13f7c827901351026c0
Contents?: true
Size: 796 Bytes
Versions: 15
Compression:
Stored size: 796 Bytes
Contents
module Para module Admin class ExportsController < Para::Admin::JobsController layout false before_action :load_exporter 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 private def load_exporter exporter_name = params[:exporter] @exporter = @component.exporters.find do |exporter| exporter.name == exporter_name end unless @exporter raise "Requested exporter (#{ exporter_name }) not found for " + ":#{ @component.identifier } component." end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems