質問編集履歴

1

routes.rbを全て記載しました。

2020/09/08 13:13

投稿

murakmixi
murakmixi

スコア26

test CHANGED
File without changes
test CHANGED
@@ -276,7 +276,15 @@
276
276
 
277
277
  ``` ruby
278
278
 
279
+ Rails.application.routes.draw do
280
+
281
+ mount RailsAdmin::Engine => '/admin', as: 'rails_admin'
282
+
283
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
284
+
285
+ root to: 'home#index'
286
+
279
- devise_for :モデル名, controllers: {
287
+ devise_for :モデル名Andy, controllers: {
280
288
 
281
289
  sessions: 'stores/sessions',
282
290
 
@@ -286,6 +294,60 @@
286
294
 
287
295
  }
288
296
 
297
+ devise_for :モデル名B, controllers: {
298
+
299
+ sessions: 'users/sessions',
300
+
301
+ passwords: 'users/passwords',
302
+
303
+ registrations: 'users/registrations',
304
+
305
+ }
306
+
307
+
308
+
309
+ get 'home/search', to: 'home#search', as: 'search_menu'
310
+
311
+ post 'home/new', to: 'home#new'
312
+
313
+ resources :home, only: [:index, :show]
314
+
315
+
316
+
317
+ get 'cart/bought', to: 'cart#bought', as: 'cart_bought'
318
+
319
+ post 'cart/edit', to: 'cart#edit'
320
+
321
+ resources :cart, only: [:show]
322
+
323
+ post 'cart/:id/pay', to:'cart#pay', as: 'cart_pay'
324
+
325
+
326
+
327
+ get 'cards/success', to: 'cards#success'
328
+
329
+ resources :cards, only: [:new, :create, :show, :destroy] do
330
+
331
+ end
332
+
333
+
334
+
335
+ post 'store/:id/complete', to:'store#complete', as: 'store_complete'
336
+
337
+ get 'store/:id/archive', to:'store#archive', as: 'store_archive'
338
+
339
+ resources :store, only: [:show]
340
+
341
+
342
+
343
+ post 'menu/delete', to:'menu#delete'
344
+
345
+ post 'menu/add', to:'menu#add'
346
+
347
+ resources :menu, only: [:show]
348
+
349
+ end
350
+
289
351
  ```
290
352
 
291
353