mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-10 07:55:21 +02:00
Fix: Use PATCH method for onboarding preferences form
The form on the user onboarding preferences page was submitting with the POST HTTP method, which caused an ActionController::RoutingError because the /users/:id route only accepts PATCH/PUT for updates. This appeared to be a state-related bug where form_with was not correctly inferring the method from the persisted @user object during the initial onboarding flow. This change explicitly sets `method: :patch` on the form_with helper to ensure the correct verb is always used, resolving the routing error for all new users. Fixes #2398
This commit is contained in:
parent
7aca5a2277
commit
55ddb01dce
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@
|
|||
|
||||
<p class="text-secondary text-xs mb-4"><%= t(".preview") %></p>
|
||||
|
||||
<%= styled_form_with model: @user, data: { turbo: false } do |form| %>
|
||||
<%= styled_form_with model: @user, method: :patch, data: { turbo: false } do |form| %>
|
||||
<%= form.hidden_field :set_onboarding_preferences_at, value: Time.current %>
|
||||
<%= form.hidden_field :redirect_to, value: "goals" %>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue