Sha256: 225e8a9c61360aa72bd89fdcd22270eb29887ec52f708ab556e27dd7b1816809
Contents?: true
Size: 721 Bytes
Versions: 5
Compression:
Stored size: 721 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] ) 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
5 entries across 5 versions & 1 rubygems