Created
September 21, 2015 22:37
-
-
Save dhonig/81b0bda2087c0f6796f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.application.routes.draw do | |
# This line mounts Spree's routes at the root of your application. | |
# This means, any requests to URLs such as /products, will go to Spree::ProductsController. | |
# If you would like to change where this engine is mounted, simply change the :at option to something different. | |
# | |
# We ask that you don't use the :as option here, as Spree relies on it being the default of "spree" | |
mount Spree::Core::Engine, :at => '/' | |
Spree::Core::Engine.add_routes do | |
namespace :api do | |
get '/orders/current_for/:id', to: 'orders#current_for' | |
post '/shipments/transfer_to_shipment', to: 'shipments#transfer_to_shipment' | |
resources :shipments, only: [:show] | |
resources :orders do | |
resources :line_items do | |
resources :blue_apron_gifts, only: [:create] | |
resources :blue_apron_recurring_preferences, only: [:create] | |
end | |
end | |
end | |
namespace :admin do | |
resources :orders do | |
member do | |
get 'blue_apron_details' | |
get 'audits' | |
end | |
end | |
resources :products do | |
member do | |
get 'audits' | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment