Hello there,
I have a Rails 7.0.4.3 application in the wild and there is one particular user out there who cannot submit the update form.
When he tries he generates the following error:
ActionController::RoutingError: No route matches [POST] /path/to/resource/resource-id
This, of course, is because that request should be a PATCH.
I am able to generate a similar error by deleting the <input type="hidden" name="_method" value="patch" autocomplete="off">
element (using browser devtools) before submitting the form.
I turned on debug logging in production to try to see if the ‘_method’ parameter was actually being sent, but the logs of ‘Parameters:’ do not seem to include ‘_method’ even for users who can submit the form successfully. Does something strip that parameter from logs or something?
I am somewhat at a loss to explain why one particular user and only that user should have this problem. Does anyone have any ideas?
Things that may or may not be relevant:
- He is using Chrome on some kind of Android phone
- The form itself has not submit button - I submit it via javascript
form.submit()