From 78d0fb001532507826fedb3def4fe17d2e7c17f1 Mon Sep 17 00:00:00 2001 From: Nicolas Florentin Date: Thu, 7 Dec 2023 09:33:56 +0100 Subject: [PATCH] makes member searches accent insensitive --- app/views/users/index.html.erb | 2 +- app/views/users/manage.html.erb | 2 +- config/initializers/ransack.rb | 8 ++++++++ spec/controllers/users_controller_spec.rb | 12 +++++++----- 4 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 config/initializers/ransack.rb diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 47b7322e..bf73c674 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -11,7 +11,7 @@
<%= search_form_for(@search, class: "navbar-form navbar-left", url: users_path) do |f| %>
- <%= f.search_field :member_search_cont, value: params.dig(:q, :member_search_cont), class: "form-control" %> + <%= f.search_field :member_search_unaccent_cont, value: params.dig(:q, :member_search_unaccent_cont), class: "form-control" %>