Fix: Use PATCH method for onboarding preferences form #2399

Closed
alvaro-rrdt wants to merge 1 commits from fix/onboarding-form-method into main

View File

@@ -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 %>
zachgoll commented 2025-06-21 05:35:48 +08:00 (Migrated from github.com)
Review

If I'm not mistaken, Rails should already be submitting a PUT request since the @user exists already and is not a new record. I'm not actually able to reproduce the original error either, so I'm wondering if there is an unrelated bug going on instead?

If I'm not mistaken, Rails should already be submitting a PUT request since the `@user` exists already and is not a new record. I'm not actually able to reproduce the original error either, so I'm wondering if there is an unrelated bug going on instead?
alvaro-rrdt commented 2025-06-21 05:43:29 +08:00 (Migrated from github.com)
Review

Might be, I didn't went back and rebuild the DB and the data after I found such issue I quickly drafted a solution and continued the onboarding process, when I posted this bug report I also thought it was some kind of one time issue and it was weird for me as well, good that you were not able to reproduce it though.

Zach, check your mail when you can please I sent you a mail

Might be, I didn't went back and rebuild the DB and the data after I found such issue I quickly drafted a solution and continued the onboarding process, when I posted this bug report I also thought it was some kind of one time issue and it was weird for me as well, good that you were not able to reproduce it though. Zach, check your mail when you can please I sent you a mail
zachgoll commented 2025-06-23 22:39:48 +08:00 (Migrated from github.com)
Review

Gotcha, I'm going to close out this PR and the corresponding issue for now as I don't think we've got a bug, but happy to reopen in the future if we can reproduce it more reliably!

Gotcha, I'm going to close out this PR and the corresponding issue for now as I don't think we've got a bug, but happy to reopen in the future if we can reproduce it more reliably!
<%= form.hidden_field :redirect_to, value: "goals" %>