Sha256: c0e101d8fd612f2ac9125f25a7c4a6b87072b23c47db9b59b6f49b71d82cf28d
Contents?: true
Size: 545 Bytes
Versions: 28
Compression:
Stored size: 545 Bytes
Contents
module Spree module Admin class PromotionCodesController < Spree::Admin::BaseController require 'csv' def index @promotion = Spree::Promotion.accessible_by(current_ability, :read).find(params[:promotion_id]) respond_to do |format| format.csv do filename = "promotion-code-list-#{@promotion.id}.csv" headers["Content-Type"] = "text/csv" headers["Content-disposition"] = "attachment; filename=\"#{filename}\"" end end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems