Sha256: aa85300fb5d2b2bec76519cfe74b7165c821be2be59d7195356535e487262388
Contents?: true
Size: 544 Bytes
Versions: 21
Compression:
Stored size: 544 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
21 entries across 21 versions & 1 rubygems