Sha256: 88a8a0353aeb15877f103253be9e4423c21c22a6e1a4dc2ab160071646a863cf

Contents?: true

Size: 1.56 KB

Versions: 14

Compression:

Stored size: 1.56 KB

Contents

Refinery::Core::Engine.routes.draw do

  # Frontend routes
  namespace :stores do
    resources :stores, :only => [:index, :show]  do
      collection do
        post :add_to_cart
        post :empty_cart
        post :checkout
      end
    end
 
  end

  namespace :orders do
    resources :orders, :only => [:index, :show, :update, :edit] do
      member do
        post :purchase
        get  :cancel_order
        post  :re_edit
      end
    end
  end


  namespace :products do
    resources :products, :only => [:show]
  end


  # Admin routes
  namespace :stores, :path => '' do
    namespace :admin, :path => 'refinery' do
      resources :stores, :except => :show do
        collection do
          post :update_positions
        end
      end
    end
  end

  # Admin routes
  namespace :products, :path => '' do
    namespace :admin, :path => 'refinery' do
      resources :products, :except => :show do
        collection do
          post :update_positions
        end
      end
    end
  end


  # Frontend routes
  namespace :orders do
    resources :orders, :path => '', :only => [:index, :show]
  end

  # Admin routes
  namespace :orders, :path => '' do
    namespace :admin, :path => 'refinery' do
      resources :orders, :except => :show do
        collection do
          post :update_positions
        end
      end
    end
  end

  # Admin routes
  namespace :addresses, :path => '' do
    namespace :admin, :path => 'refinery' do
      resources :addresses, :except => :show do
        collection do
          post :update_positions
        end
      end
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
refinerycms-stores-0.0.14 config/routes.rb
refinerycms-stores-0.0.13 config/routes.rb
refinerycms-stores-0.0.12 config/routes.rb
refinerycms-stores-0.0.11 config/routes.rb
refinerycms-stores-0.0.10 config/routes.rb
refinerycms-stores-0.0.9 config/routes.rb
refinerycms-stores-0.0.8 config/routes.rb
refinerycms-stores-0.0.7 config/routes.rb
refinerycms-stores-0.0.6 config/routes.rb
refinerycms-stores-0.0.5 config/routes.rb
refinerycms-stores-0.0.4 config/routes.rb
refinerycms-stores-0.0.3 config/routes.rb
refinerycms-stores-0.0.2 config/routes.rb
refinerycms-stores-0.0.1 config/routes.rb