routes.rb 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. Hello::Application.routes.draw do
  2. get "hello_world/json"
  3. get "hello_world/db"
  4. get "fortune" => "hello_world#fortune"
  5. get "update" => "hello_world#update"
  6. # The priority is based upon order of creation:
  7. # first created -> highest priority.
  8. # Sample of regular route:
  9. # match 'products/:id' => 'catalog#view'
  10. # Keep in mind you can assign values other than :controller and :action
  11. # Sample of named route:
  12. # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  13. # This route can be invoked with purchase_url(:id => product.id)
  14. # Sample resource route (maps HTTP verbs to controller actions automatically):
  15. # resources :products
  16. # Sample resource route with options:
  17. # resources :products do
  18. # member do
  19. # get 'short'
  20. # post 'toggle'
  21. # end
  22. #
  23. # collection do
  24. # get 'sold'
  25. # end
  26. # end
  27. # Sample resource route with sub-resources:
  28. # resources :products do
  29. # resources :comments, :sales
  30. # resource :seller
  31. # end
  32. # Sample resource route with more complex sub-resources
  33. # resources :products do
  34. # resources :comments
  35. # resources :sales do
  36. # get 'recent', :on => :collection
  37. # end
  38. # end
  39. # Sample resource route within a namespace:
  40. # namespace :admin do
  41. # # Directs /admin/products/* to Admin::ProductsController
  42. # # (app/controllers/admin/products_controller.rb)
  43. # resources :products
  44. # end
  45. # You can have the root of your site routed with "root"
  46. # just remember to delete public/index.html.
  47. # root :to => 'welcome#index'
  48. # See how all your routes lay out with "rake routes"
  49. # This is a legacy wild controller route that's not recommended for RESTful applications.
  50. # Note: This route will make all actions in every controller accessible via GET requests.
  51. # match ':controller(/:action(/:id))(.:format)'
  52. end