Sha256: 7f29b7dcfc0c08889faf988be2bb72767298735dcdd1049e4bd43d11befd6786

Contents?: true

Size: 1.24 KB

Versions: 5

Compression:

Stored size: 1.24 KB

Contents

ActionController::Routing::Routes.draw do |map|
  
  map.namespace :admin do |admin|
    admin.namespace :shop, :member => { :remove => :get } do |shop|      
      shop.resources :categories, :collection => { :sort => :put }, :member => { :products => :get } do |category|
        category.resources :products, :only => :new
      end
      
      shop.resources :products, :except => :new, :collection => { :sort => :put } do |product|
        product.resources :images,            :controller => 'products/images',   :collection => { :sort => :put }, :only => [:index, :create, :destroy]
        product.resources :variants,          :controller => 'products/variants', :only => [ :create, :destroy]
        product.resources :variant_templates, :controller => 'products/variant_templates', :only => [ :update ]
      end
      
      shop.resources :packages, :member => { :remove => :get } do |packages|
        packages.resources :packings,         :controller => 'packages/packings', :collection => { :sort => :put }, :only => [:create, :update, :destroy]
      end
      
      shop.resources :variants
      
      shop.resources :customers
      
      shop.resources :orders
    end

    admin.resources :shops, :as => 'shop', :only => [ :index ]
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
radiant-shop-extension-0.11.5 config/routes.rb
radiant-shop-extension-0.11.4 config/routes.rb
radiant-shop-extension-0.11.3 config/routes.rb
radiant-shop-extension-0.11.1 config/routes.rb
radiant-shop-extension-0.11.0 config/routes.rb