Skip to content

Commit

Permalink
fix(search): prevent sending tag_ids as string (#2587)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvilleneuve authored Jan 27, 2025
1 parent 1e7d96d commit 324860d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/views/users/_search_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<%= form_with method: :get, url: url, local: true do |form| %>
<div class="d-flex">
<% url_params.except(:search_query, :motif_category_id).each do |key, value| %>
<%= form.hidden_field key, value: value %>
<% if value.is_a?(Array) %>
<% value.each do |v| %>
<%= form.hidden_field key.to_s + "[]", value: v %>
<% end %>
<% else %>
<%= form.hidden_field key, value: value %>
<% end %>
<% end %>

<%= form.text_field :search_query, placeholder: "Prénom, nom, email, n° CAF...", class: "form-control mb-0", value: params[:search_query] %>
Expand Down

0 comments on commit 324860d

Please sign in to comment.