From 277df57e469a997611c8c7512e47dbdfcf9a2405 Mon Sep 17 00:00:00 2001 From: Meutel Date: Tue, 9 Aug 2016 11:38:25 +0200 Subject: [PATCH] Transliterate accented characters in search --- app/helpers/preferences_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb index d27f8bf..19fa664 100644 --- a/app/helpers/preferences_helper.rb +++ b/app/helpers/preferences_helper.rb @@ -27,7 +27,8 @@ module PreferencesHelper end if @preference.term conditions.push "#{sort_col} LIKE ?" - params.push "%#{@preference.term}%" + search_term = ActiveSupport::Inflector.transliterate(@preference.term) + params.push "%#{search_term}%" end [ conditions.join(" AND ") ] + params end