questionsコントローラ
とanswersコントローラ
を生成したいのですが、
Rails.application.routes.draw do resources :questions # (1) resources :answers # (2) resource :mypage,only:[:show,:update,:destroy] do resources :questions ,only:[:index] # (3) resources :answers ,only:[:index] # (4) end end
(1)(2)
については
$ rails g controller questions $ rails g controller answers
でいいと思うのですが、
(3)(4)
については
$ rails g controller *** $ rails g controller ***
...どうすればいいのでしょうか。
ご教授お願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。