Class: Spree::Admin::PromotionCodesController
- Inherits:
-
BaseController
- Object
- BaseController
- BaseController
- Spree::Admin::PromotionCodesController
- Defined in:
- app/controllers/spree/admin/promotion_codes_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/spree/admin/promotion_codes_controller.rb', line 6 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 |