Open jakemumu opened 2 years ago
Can you explain a little more what needs to be changed to support Turbo? Is it default devise behaviour or custom stuff in this extension that might need to be updated to add support?
Apologies I really need to turn notifications on here -- sure, so basically, when Turbo is enabled and a form is submitted, the form needs to redirect or else Turbo won't re-render the page, there is a lot of information about it over the Hotwire GitHub.
The quick patch is to just change a couple methods in the user controllers:
When things are successful the controllers redirect and are fine, but currently when a failure happens: render :new
is called, simply changing this to render :new, status: :unprocessable_entity
fixes compatibility with Turbo.
That's in both the user sessions controller, and the user registrations controller.
Turbo requires redirects on form submissions, or in the case on
render :new
when login fails, the status onunprocessable_entity
as the response code.Is it possible to update this in this gem?