annotate config/routes.rb @ 6:82cb8887fb56

Hahaha, no assets.
author edogawaconan <me@myconan.net>
date Fri, 05 Sep 2014 18:30:35 +0900
parents a1c9fadc0904
children 207917e41964
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
1 Rails.application.routes.draw do
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
2 # The priority is based upon order of creation: first created -> highest priority.
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
3 # See how all your routes lay out with "rake routes".
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
4
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
5 # You can have the root of your site routed with "root"
6
82cb8887fb56 Hahaha, no assets.
edogawaconan <me@myconan.net>
parents: 0
diff changeset
6 root 'static#index'
0
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
7
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
8 # Example of regular route:
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
9 # get 'products/:id' => 'catalog#view'
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
10
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
11 # Example of named route that can be invoked with purchase_url(id: product.id)
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
12 # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
13
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
14 # Example resource route (maps HTTP verbs to controller actions automatically):
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
15 # resources :products
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
16
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
17 # Example resource route with options:
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
18 # resources :products do
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
19 # member do
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
20 # get 'short'
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
21 # post 'toggle'
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
22 # end
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
23 #
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
24 # collection do
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
25 # get 'sold'
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
26 # end
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
27 # end
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
28
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
29 # Example resource route with sub-resources:
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
30 # resources :products do
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
31 # resources :comments, :sales
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
32 # resource :seller
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
33 # end
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
34
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
35 # Example resource route with more complex sub-resources:
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
36 # resources :products do
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
37 # resources :comments
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
38 # resources :sales do
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
39 # get 'recent', on: :collection
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
40 # end
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
41 # end
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
42
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
43 # Example resource route with concerns:
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
44 # concern :toggleable do
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
45 # post 'toggle'
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
46 # end
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
47 # resources :posts, concerns: :toggleable
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
48 # resources :photos, concerns: :toggleable
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
49
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
50 # Example resource route within a namespace:
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
51 # namespace :admin do
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
52 # # Directs /admin/products/* to Admin::ProductsController
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
53 # # (app/controllers/admin/products_controller.rb)
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
54 # resources :products
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
55 # end
a1c9fadc0904 Initial.
edogawaconan <me@myconan.net>
parents:
diff changeset
56 end