Sha256: febb81ea82f20da121fb33b2ae6e5dae12880f981042e4e0d2f68f09979c1dec
Contents?: true
Size: 689 Bytes
Versions: 4
Compression:
Stored size: 689 Bytes
Contents
# frozen_string_literal: true module SolidusFriendlyPromotions module Admin class PromotionCodeBatchesController < BaseController belongs_to "solidus_friendly_promotions/promotion" create.after :build_promotion_code_batch def download require "csv" @promotion_code_batch = SolidusFriendlyPromotions::PromotionCodeBatch.find( params[:promotion_code_batch_id] ) send_data( render_to_string, filename: "promotion-code-batch-list-#{@promotion_code_batch.id}.csv" ) end private def build_promotion_code_batch @promotion_code_batch.process end end end end
Version data entries
4 entries across 4 versions & 1 rubygems