コントローラの「更新」アクションに提出する必要があるフォームがあります。代わりに "show"アクションが呼び出されており、 "update"アクションは実行されません。Railsは、更新アクションの代わりにアクションが呼び出されていることを示します。
マイルート:フォームがによって作成された
evaluations GET /evaluations(.:format) evaluations#index POST /evaluations(.:format) evaluations#create new_evaluation GET /evaluations/new(.:format) evaluations#new edit_evaluation GET /evaluations/:id/edit(.:format) evaluations#edit evaluation GET /evaluations/:id(.:format) evaluations#show PATCH /evaluations/:id(.:format) evaluations#update PUT /evaluations/:id(.:format) evaluations#update DELETE /evaluations/:id(.:format) evaluations#destroy
:
action: "<%= evaluation_path %>",
method: "patch" //I have tried both "post" and "put" as well
私のコントローラは、同様に有効な "更新" アクションを持っています。
フォームは、リアクションコンポーネントに渡されるJavascriptオブジェクトからレンダリングされます。 – cmwall
フォームコード全体、少なくともform_forまたはform_tagを表示してください。 – Leito
form_forタグはありません。フォームは、JavascriptオブジェクトをReact Componentに渡すことによって作成され、React Componentはアクションとメソッドを設定します。 – cmwall