Skip to content

Instantly share code, notes, and snippets.

@HoyaBoya
Last active January 2, 2016 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HoyaBoya/8228360 to your computer and use it in GitHub Desktop.
Save HoyaBoya/8228360 to your computer and use it in GitHub Desktop.
Spree::Core::Engine.routes.draw do
namespace :api, defaults: { format: 'json' } do
resources :orders do
end
end
end
@HoyaBoya
Copy link
Author

HoyaBoya commented Jan 2, 2014

This belongs in routes.rb for a Rails app that uses Spree.....forgetting only:[] in resources :orders will change the order of the routes and the /orders/mine route that is in spree/api will not longer map to the right action in the OrdersController (will go to /orders/show#id=mine).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment