1 Hello::Application.routes.draw do
3 # The priority is based upon order of creation: first created -> highest priority.
4 # See how all your routes lay out with "rake routes".
6 # You can have the root of your site routed with "root"
9 # Example of regular route:
10 # get 'products/:id' => 'catalog#view'
12 # Example of named route that can be invoked with purchase_url(id: product.id)
13 # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
15 # Example resource route (maps HTTP verbs to controller actions automatically):
18 # Example resource route with options:
19 # resources :products do
30 # Example resource route with sub-resources:
31 # resources :products do
32 # resources :comments, :sales
36 # Example resource route with more complex sub-resources:
37 # resources :products do
40 # get 'recent', on: :collection
44 # Example resource route with concerns:
45 # concern :toggleable do
48 # resources :posts, concerns: :toggleable
49 # resources :photos, concerns: :toggleable
51 # Example resource route within a namespace:
53 # # Directs /admin/products/* to Admin::ProductsController
54 # # (app/controllers/admin/products_controller.rb)