Sha256: 54197260e4538d0313ae64e4dd6b1950bf4643626c5b177f9fe943cc64eed69f

Contents?: true

Size: 1.31 KB

Versions: 32

Compression:

Stored size: 1.31 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

  populate_redirect = redirect do |params, request|
    request.flash[:error] = Spree.t(:populate_get_error)
    request.referer || '/cart'
  end

  get '/orders/populate', :to => 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 '/content/*path', :to => 'content#show', :as => :content
  get '/cart_link', :to => 'store#cart_link', :as => :cart_link
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
spree_frontend-2.4.10 config/routes.rb
spree_frontend-2.3.13 config/routes.rb
spree_frontend-2.4.9 config/routes.rb
spree_frontend-2.3.12 config/routes.rb
solidus_frontend-1.0.0.pre3 config/routes.rb
solidus_frontend-1.0.0.pre2 config/routes.rb
spree_frontend-2.4.8 config/routes.rb
spree_frontend-2.3.11 config/routes.rb
solidus_frontend-1.0.0.pre config/routes.rb
spree_frontend-2.4.7 config/routes.rb
spree_frontend-2.3.10 config/routes.rb
spree_frontend-2.4.6 config/routes.rb
spree_frontend-2.3.9 config/routes.rb
spree_frontend-2.3.8 config/routes.rb
spree_frontend-2.4.5 config/routes.rb
spree_frontend-2.4.4 config/routes.rb
spree_frontend-2.3.7 config/routes.rb
spree_frontend-3.0.0.rc1 config/routes.rb
spree_frontend-2.4.3 config/routes.rb
spree_frontend-2.4.2 config/routes.rb