0
|
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
|
6 root 'static#index'
|
0
|
7
|
15
|
8 get "*id" => "tweets#show", :defaults => { :format => :atom }
|
|
9
|
0
|
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
|