OSDN Git Service

bfa8245abb158a7e8a669533f0260f297937ab75
[pettanr/pettanr.git] / config / routes.rb
1 Pettanr::Application.routes.draw do
2
3   devise_for :users , :controllers => { :registrations => "user_registrations" }
4   devise_for :admins
5   
6   Pettanr::Application.licenses.each do |name, klass|
7     mount Module.const_get(klass)::Engine => "/#{name}"
8   end
9   
10   resources :authors do
11     collection do
12       get :index
13       get :show
14       get :count
15       post :create
16       get :list
17       get :browse
18     end
19     member do
20       put :update
21       delete :destroy
22     end
23   end
24   resources :artists do
25     collection do
26       get :index
27       get :show
28       get :count
29       post :create
30       get :list
31       get :browse
32     end
33     member do
34       put :update
35       delete :destroy
36     end
37   end
38   resources :speech_balloon_templates do
39     collection do
40       get :index
41       get :show
42       get :list
43     end
44     member do
45       get :browse
46       delete :destroy
47     end
48   end
49   resources :speeches do
50     collection do
51       get :list
52       get :browse
53     end
54     member do
55     end
56   end
57   resources :balloons do
58     collection do
59       get :list
60       get :browse
61     end
62     member do
63     end
64   end
65   resources :speech_balloons do
66     collection do
67       get :list
68       get :browse
69     end
70     member do
71     end
72   end
73   resources :panel_pictures do
74     collection do
75       get :index
76       get :show
77       get :list
78       get :browse
79     end
80     member do
81     end
82   end
83   resources :pictures do
84     collection do
85       get :show
86       get :md5
87     end
88     member do
89       get :credit
90     end
91   end
92   resources :resource_pictures do
93     collection do
94       get :index
95       get :new
96       get :show
97       post :create
98       get :count
99       get :list
100       get :browse
101     end
102     member do
103       get :credit
104     end
105   end
106   resources :original_pictures do
107     new do
108       get :new
109     end
110     collection do
111       get :index
112       get :show
113       get :history
114       post :create
115       get :list
116       get :browse
117     end
118     member do
119       get :edit
120       put :update
121       delete :destroy
122     end
123   end
124   resources :original_picture_license_groups do
125     new do
126       get :new
127     end
128     collection do
129       post :create
130     end
131   end
132   resources :colors do
133     collection do
134       get :index
135       get :list
136     end
137     member do
138     end
139   end
140   resources :panel_colors do
141     collection do
142       get :index
143     end
144     member do
145     end
146   end
147   resources :ground_colors do
148     collection do
149       get :index
150     end
151     member do
152     end
153   end
154   resources :ground_pictures do
155     collection do
156       get :index
157     end
158     member do
159     end
160   end
161   resources :panels do
162     new do
163       get :new
164     end
165     collection do
166       get :index
167       get :show
168       get :count
169       post :create
170       get :list
171       get :browse
172     end
173     member do
174       put :update
175       delete :destroy
176     end
177   end
178   resources :stories do
179     new do
180       get :new
181     end
182     collection do
183       get :show
184       post :create
185       get :list
186       get :browse
187     end
188     member do
189       put :update
190       delete :destroy
191     end
192   end
193   resources :comics do
194     new do
195       get :new
196     end
197     collection do
198       get :index
199       get :show
200       get :count
201       post :create
202       get :list
203       get :browse
204     end
205     member do
206       get :edit
207       put :update
208       delete :destroy
209     end
210   end
211   resources :licenses do
212     collection do
213       get :index
214       get :show
215       get :list
216       get :browse
217     end
218   end
219   resources :license_groups do
220     collection do
221       get :index
222       get :show
223       get :list
224       get :browse
225     end
226   end
227   resources :system_pictures do
228     collection do
229       get :index
230       get :show
231       get :list
232     end
233     member do
234       get :browse
235       delete :destroy
236     end
237   end
238
239   # The priority is based upon order of creation:
240   # first created -> highest priority.
241
242   # Sample of regular route:
243   #   match 'products/:id' => 'catalog#view'
244   # Keep in mind you can assign values other than :controller and :action
245   match 'resource_pictures/:subdir/:id(.:format)/' => 'resource_pictures#show'
246   match 'pictures/:subdir/:id(.:format)/' => 'pictures#show'
247   match 'stories/comic/:id(.:format)' => 'stories#comic'
248   match 'home/(:action)', :controller => 'home'
249   match 'system/(:action)', :controller => 'system'
250   match 'authors/(:action(/:id))', :controller => 'authors'
251   
252   # Sample of named route:
253   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
254   # This route can be invoked with purchase_url(:id => product.id)
255
256   # Sample resource route (maps HTTP verbs to controller actions automatically):
257   #   resources :products
258
259   # Sample resource route with options:
260   #   resources :products do
261   #     member do
262   #       get 'short'
263   #       post 'toggle'
264   #     end
265   #
266   #     collection do
267   #       get 'sold'
268   #     end
269   #   end
270
271   # Sample resource route with sub-resources:
272   #   resources :products do
273   #     resources :comments, :sales
274   #     resource :seller
275   #   end
276
277   # Sample resource route with more complex sub-resources
278   #   resources :products do
279   #     resources :comments
280   #     resources :sales do
281   #       get 'recent', :on => :collection
282   #     end
283   #   end
284
285   # Sample resource route within a namespace:
286   #   namespace :admin do
287   #     # Directs /admin/products/* to Admin::ProductsController
288   #     # (app/controllers/admin/products_controller.rb)
289   #     resources :products
290   #   end
291
292   # You can have the root of your site routed with "root"
293   # just remember to delete public/index.html.
294   root :to => 'comics#top'
295
296   # See how all your routes lay out with "rake routes"
297
298   # This is a legacy wild controller route that's not recommended for RESTful applications.
299   # Note: This route will make all actions in every controller accessible via GET requests.
300   #match ':controller(/:action(/:id(.:format)))'
301 end