OSDN Git Service

Add hello controller.
[example/hello.git] / config / routes.rb
1 Hello::Application.routes.draw do
2   get "hello/index"
3   # The priority is based upon order of creation: first created -> highest priority.
4   # See how all your routes lay out with "rake routes".
5
6   # You can have the root of your site routed with "root"
7   # root 'welcome#index'
8
9   # Example of regular route:
10   #   get 'products/:id' => 'catalog#view'
11
12   # Example of named route that can be invoked with purchase_url(id: product.id)
13   #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
14
15   # Example resource route (maps HTTP verbs to controller actions automatically):
16   #   resources :products
17
18   # Example resource route with options:
19   #   resources :products do
20   #     member do
21   #       get 'short'
22   #       post 'toggle'
23   #     end
24   #
25   #     collection do
26   #       get 'sold'
27   #     end
28   #   end
29
30   # Example resource route with sub-resources:
31   #   resources :products do
32   #     resources :comments, :sales
33   #     resource :seller
34   #   end
35
36   # Example 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
44   # Example resource route with concerns:
45   #   concern :toggleable do
46   #     post 'toggle'
47   #   end
48   #   resources :posts, concerns: :toggleable
49   #   resources :photos, concerns: :toggleable
50
51   # Example resource route within a namespace:
52   #   namespace :admin do
53   #     # Directs /admin/products/* to Admin::ProductsController
54   #     # (app/controllers/admin/products_controller.rb)
55   #     resources :products
56   #   end
57 end