Sha256: 8648045f9b99e8d2c227a8326893606573fd4bae2cc525d126d38d66dd946e96

Contents?: true

Size: 859 Bytes

Versions: 2

Compression:

Stored size: 859 Bytes

Contents

# frozen_string_literal: true

if SolidusSupport.backend_available?
  Spree::Core::Engine.routes.draw do
    namespace :admin do
      resources :promotions do
        resources :promotion_rules
        resources :promotion_actions
        resources :promotion_codes, only: [:index, :new, :create]
        resources :promotion_code_batches, only: [:index, :new, :create] do
          get '/download', to: "promotion_code_batches#download", defaults: { format: "csv" }
        end
      end

      resources :promotion_categories, except: [:show]
    end
  end
end

if SolidusSupport.admin_available?
  SolidusAdmin::Engine.routes.draw do
    require "solidus_admin/admin_resources"
    extend SolidusAdmin::AdminResources

    admin_resources :promotions, only: [:index, :destroy]
    admin_resources :promotion_categories, only: [:index, :destroy]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_legacy_promotions-4.4.1 config/routes.rb
solidus_legacy_promotions-4.4.0 config/routes.rb