Load answer through question in answers controller

We are simplifying the load answer and we can remove the ambiguous
hidden field from answer form.
This commit is contained in:
taitus
2022-09-09 15:56:36 +02:00
parent 01005b50cb
commit 405b37f605
9 changed files with 14 additions and 20 deletions

View File

@@ -169,7 +169,8 @@ namespace :admin do
end
resources :questions, shallow: true do
resources :answers, except: [:index, :destroy], controller: "questions/answers" do
resources :answers, except: [:index, :destroy], controller: "questions/answers", shallow: false
resources :answers, only: [], controller: "questions/answers" do
resources :images, controller: "questions/answers/images"
resources :videos, controller: "questions/answers/videos"
get :documents, to: "questions/answers#documents"