Rails: How to force a form to post rather than patch?
问题 I have a form for creating tasks which is displayed on both projects/show and tasks/show. The form on projects/show creates new tasks fine, but on tasks/show it wants to edit the task, since I need to call the task ID from within the show action of my tasks controller. I need to modify this form to always create new tasks. I tried method: post but rails still inserts <input type="hidden" name="_method" value="patch" /> into the HTML. Here are my controllers and the form: # Tasks Controller