레일에서 라우팅 오류를 해결하는 데 도움이됩니다
-
05-07-2019 - |
문제
컨트롤러가 호출되었습니다 form_questions_answers
그 안에 호출되는 메소드가 있습니다 modify_rule
그러나 내가 게시물을 수행 할 때 /form_questions_answers/modify_rule/60
Rails는 다음과 같이 말합니다.
Routing Error
No route matches "/form_questions_answers/modify_rule/60" with {:method=>:post}
왜 이런 일이 일어나고 있습니까? map.resources :form_question_answers
routes.rb에서 map.connect ':controller/:action/:id'
Routes.rb 파일의 하단에서 modify_rule
행동이 유발되는 행동?
해결책
/form_questions_answers/modify_rule/60
Map.Resources 기준으로 게시물을 수락하지 않습니다. 그것은 휴식과 일치하는 데 도움이 될 것입니다.
당신은 살펴보고 싶을 수도 있습니다 레일 라우팅 가이드 경로에 대한 일부 정보.
행복한 칠면조의 날!
제휴하지 않습니다 StackOverflow