comparison config/routes.rb @ 89:d5a0d66ee457

Finish updating to rails 5
author nanaya <me@myconan.net>
date Sat, 02 Jul 2016 16:26:00 +0900
parents 8f68ca606099
children 5af9b537db86
comparison
equal deleted inserted replaced
88:cf9a9ce2d034 89:d5a0d66ee457
1 Rails.application.routes.draw do 1 Rails.application.routes.draw do
2 # The priority is based upon order of creation: first created -> highest priority.
3 # See how all your routes lay out with "rake routes".
4
5 # You can have the root of your site routed with "root"
6 root "tweets#index" 2 root "tweets#index"
7 3
8 get "*id" => "tweets#show", :defaults => { :format => :atom }, :as => "tweet" 4 get "*id" => "tweets#show", :defaults => { :format => :atom }, :as => "tweet"
9
10 # Example of regular route:
11 # get 'products/:id' => 'catalog#view'
12
13 # Example of named route that can be invoked with purchase_url(id: product.id)
14 # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
15
16 # Example resource route (maps HTTP verbs to controller actions automatically):
17 # resources :products
18
19 # Example resource route with options:
20 # resources :products do
21 # member do
22 # get 'short'
23 # post 'toggle'
24 # end
25 #
26 # collection do
27 # get 'sold'
28 # end
29 # end
30
31 # Example resource route with sub-resources:
32 # resources :products do
33 # resources :comments, :sales
34 # resource :seller
35 # end
36
37 # Example resource route with more complex sub-resources:
38 # resources :products do
39 # resources :comments
40 # resources :sales do
41 # get 'recent', on: :collection
42 # end
43 # end
44
45 # Example resource route with concerns:
46 # concern :toggleable do
47 # post 'toggle'
48 # end
49 # resources :posts, concerns: :toggleable
50 # resources :photos, concerns: :toggleable
51
52 # Example resource route within a namespace:
53 # namespace :admin do
54 # # Directs /admin/products/* to Admin::ProductsController
55 # # (app/controllers/admin/products_controller.rb)
56 # resources :products
57 # end
58 end 5 end