Skip to content

Instantly share code, notes, and snippets.

@hardbap
Last active December 17, 2015 12: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 hardbap/5607498 to your computer and use it in GitHub Desktop.
Save hardbap/5607498 to your computer and use it in GitHub Desktop.
resources :sellers, only: [ :index, :show ] do
resources :contracts, shallow: true
end
Prefix Verb URI Pattern Controller#Action
seller_contracts GET /sellers/:seller_id/contracts(.:format) contracts#index
POST /sellers/:seller_id/contracts(.:format) contracts#create
new_seller_contract GET /sellers/:seller_id/contracts/new(.:format) contracts#new
edit_contract GET /contracts/:id/edit(.:format) contracts#edit
contract GET /contracts/:id(.:format) contracts#show
PATCH /contracts/:id(.:format) contracts#update
PUT /contracts/:id(.:format) contracts#update
DELETE /contracts/:id(.:format) contracts#destroy
sellers GET /sellers(.:format) sellers#index
seller GET /sellers/:id(.:format) sellers#show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment