You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Had an issue where users could not create case contacts. This PR was a bit of a hasty fix.
Causes
The issue was when an org has neither driving reimbursement nor additional expenses no parameters would be submitted on /case_contacts/:id/form/expense.
This meant that params would not contain case_contact and params[:case_contact][:status] = step.to_s unless @case_contact.active? would fail or later with params.require(:case_contact).permit(...)
Temp Fix
The temporary fix was to add <%= form.hidden_field :placeholder, value: true %> to ensure something is always submitted.
We should find a better fix on both the system and request sides. From a user perspective it probably does not make sense that page is ever shown if a user can't do anything on it. Maybe it should not be shown?
On the other hand that might add a lot of complexity and instead we should be able to gracefully recover if a request is sent with no in the params case_contact.
I am not sure what the ideal solution is but both paths are probably worth exploring.
The text was updated successfully, but these errors were encountered:
Had an issue where users could not create case contacts. This PR was a bit of a hasty fix.
Causes
The issue was when an org has neither driving reimbursement nor additional expenses no parameters would be submitted on
/case_contacts/:id/form/expense
.This meant that
params
would not containcase_contact
andparams[:case_contact][:status] = step.to_s unless @case_contact.active?
would fail or later withparams.require(:case_contact).permit(...)
Temp Fix
The temporary fix was to add
<%= form.hidden_field :placeholder, value: true %>
to ensure something is always submitted.casa/app/views/case_contacts/form/expenses.html.erb
Line 5 in f8d7cf8
This is a terrible hacky fix.
Goals
We should find a better fix on both the system and request sides. From a user perspective it probably does not make sense that page is ever shown if a user can't do anything on it. Maybe it should not be shown?
On the other hand that might add a lot of complexity and instead we should be able to gracefully recover if a request is sent with no in the params
case_contact
.I am not sure what the ideal solution is but both paths are probably worth exploring.
The text was updated successfully, but these errors were encountered: