These three files show how to handle forms with (legacy) Turbolinks in your Rails app with the new Turbo Native adapters.
- The Rails controller renders the form partial with an
:unprocessable_entitystatus when encountering a form validation error - The form is submitted via AJAX (
local: falseorremote: truedepending on your Rails version) - This is caught via the
ajax:error->form#onErrorStimulus action - The Stimulus controller replaces the form's contents with the server-sided rendered HTML
- The native app is informed when the redirect occurs on a succesful submission