routes.rb 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #---
  2. # Excerpted from "Agile Web Development with Rails",
  3. # published by The Pragmatic Bookshelf.
  4. # Copyrights apply to this code. It may not be used to create training material,
  5. # courses, books, articles, and the like. Contact us if you are in doubt.
  6. # We make no guarantees that this code is fit for any purpose.
  7. # Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  8. #---
  9. DepotClient::Application.routes.draw do
  10. # The priority is based upon order of creation:
  11. # first created -> highest priority.
  12. # Sample of regular route:
  13. # match 'products/:id' => 'catalog#view'
  14. # Keep in mind you can assign values other than :controller and :action
  15. # Sample of named route:
  16. # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  17. # This route can be invoked with purchase_url(:id => product.id)
  18. # Sample resource route (maps HTTP verbs to controller actions automatically):
  19. # resources :products
  20. # Sample resource route with options:
  21. # resources :products do
  22. # member do
  23. # get 'short'
  24. # post 'toggle'
  25. # end
  26. #
  27. # collection do
  28. # get 'sold'
  29. # end
  30. # end
  31. # Sample resource route with sub-resources:
  32. # resources :products do
  33. # resources :comments, :sales
  34. # resource :seller
  35. # end
  36. # Sample resource route with more complex sub-resources
  37. # resources :products do
  38. # resources :comments
  39. # resources :sales do
  40. # get 'recent', :on => :collection
  41. # end
  42. # end
  43. # Sample resource route within a namespace:
  44. # namespace :admin do
  45. # # Directs /admin/products/* to Admin::ProductsController
  46. # # (app/controllers/admin/products_controller.rb)
  47. # resources :products
  48. # end
  49. # You can have the root of your site routed with "root"
  50. # just remember to delete public/index.html.
  51. # root :to => 'welcome#index'
  52. # See how all your routes lay out with "rake routes"
  53. # This is a legacy wild controller route that's not recommended for RESTful applications.
  54. # Note: This route will make all actions in every controller accessible via GET requests.
  55. # match ':controller(/:action(/:id(.:format)))'
  56. end