Skip to content

Commit 2915c0a

Browse files
authored
Permit search_form parameter (#3206)
When passing it to the attendance buttons. This doesn't have any effect on the functionality, but avoids an error being logged related to the `session_slug` being unpermitted.
2 parents dcfc921 + fde5446 commit 2915c0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/components/app_patient_session_search_result_card_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class AppPatientSessionSearchResultCardComponent < ViewComponent::Base
3333
3434
<% if context == :register %>
3535
<div class="app-button-group">
36-
<%= helpers.govuk_button_to "Attending", create_session_register_path(session, patient, "present", **params.permit(search_form: {})), class: "app-button--secondary app-button--small" %>
37-
<%= helpers.govuk_button_to "Absent", create_session_register_path(session, patient, "absent", **params.permit(search_form: {})), class: "app-button--secondary-warning app-button--small" %>
36+
<%= helpers.govuk_button_to "Attending", create_session_register_path(session, patient, "present", search_form: params[:search_form]&.permit!), class: "app-button--secondary app-button--small" %>
37+
<%= helpers.govuk_button_to "Absent", create_session_register_path(session, patient, "absent", search_form: params[:search_form]&.permit!), class: "app-button--secondary-warning app-button--small" %>
3838
</div>
3939
<% end %>
4040
<% end %>

0 commit comments

Comments
 (0)