forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.rb
30 lines (22 loc) · 1.04 KB
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Spree::Core::Engine.routes.draw 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'
get '/orders/:id/token/:token' => 'orders#show', as: :token_order
resources :orders, except: [:index, :new, :create, :destroy] do
post :populate, on: :collection
end
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 '/unauthorized', to: 'home#unauthorized', as: :unauthorized
get '/content/cvv', to: 'content#cvv', as: :cvv
get '/cart_link', to: 'store#cart_link', as: :cart_link
end