Rails 6.1 form_with update

Problem

My form submit process as WidgetsController#create as HTML
My expectation: WidgetsController#create as JS

Cause

Due to this PR

Rails 6.0: form_with would generate a remote form by default.
Rails 6.1: form_with would generate a non-remote form by default.

Solution

Update config config/environments/*.rb

config.action_view.form_with_generates_remote_forms = true