While digging around a larger app I came across a problem with form for updating records. It turns out the problem is caused by a combination of hidden/select tag. When both fields are present it sends a POST request and fails with an error (route not found). With a single field the request is correctly recognized as PATCH.
Part of the code is used for dynamically adding languages to a model and storing it into hstore column. When there are no languages I’d like to send an empty value to reset the field.
I’ve created a sample app which reproduces this error. It’s nothing more than a blank rails app with hstore field on AR model. Can anyone help me explain what’s going wrong here?