Sha256: 8b7829f7cddfe78c2ed1e9fbb92a5e3f705d0ceb7557afb88fd3bd3d56f56b5f

Contents?: true

Size: 1.41 KB

Versions: 5

Compression:

Stored size: 1.41 KB

Contents

Spree::Core::Engine.add_routes do
  root to: 'home#index'

  resources :products, only: [:index, :show]

  get '/locale/set', to: 'locale#set'

  # non-restful checkout stuff
  patch '/checkout/update/:state', to: 'checkout#update', as: :update_checkout
  get '/checkout/:state', to: 'checkout#edit', as: :checkout_state
  get '/checkout', to: 'checkout#edit', as: :checkout

  get '/orders/populate', to: 'orders#populate_redirect'

  resources :orders, except: [:index, :new, :create, :destroy] do
    post :populate, on: :collection
  end

  resources :addresses, except: [:show]

  get '/cart', to: 'orders#edit', as: :cart
  patch '/cart', to: 'orders#update', as: :update_cart
  put '/cart/empty', to: 'orders#empty', as: :empty_cart

  # route globbing for pretty nested taxon and product paths
  get '/t/*id', to: 'taxons#show', as: :nested_taxons
  get '/product_carousel/:id', to: 'taxons#product_carousel'

  get '/unauthorized', to: 'home#unauthorized', as: :unauthorized
  get '/content/cvv', to: 'content#cvv', as: :cvv
  get '/content/test', to: 'content#test'
  get '/cart_link', to: 'store#cart_link', as: :cart_link
  get '/account_link', to: 'store#account_link', as: :account_link

  get '/api_tokens', to: 'store#api_tokens'
  post '/ensure_cart', to: 'store#ensure_cart'
  get '/products/:id/related', to: 'products#related'

  get '/currency/set', to: 'currency#set', defaults: { format: :json }, as: :set_currency
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spree_frontend-4.2.0.rc4 config/routes.rb
spree_frontend-4.2.0.rc3 config/routes.rb
spree_frontend-4.2.0.rc2 config/routes.rb
spree_frontend-4.2.0.rc1 config/routes.rb
spree_frontend-4.2.0.beta config/routes.rb