From a3af7df7ea85ee714eabf4c3f79c2bec54e396d7 Mon Sep 17 00:00:00 2001 From: Vadim Kazakov Date: Mon, 25 Nov 2019 10:57:50 -0700 Subject: [PATCH 1/2] Update Mongoid::Search::Util.normalize_keywords Use unicode_normalize instead of normalize as this is deprecated as of Rails 6.0 and will be removed in Rails 6.1 --- lib/mongoid_search/util.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongoid_search/util.rb b/lib/mongoid_search/util.rb index d409f23..333e1fa 100644 --- a/lib/mongoid_search/util.rb +++ b/lib/mongoid_search/util.rb @@ -40,7 +40,7 @@ def self.normalize_keywords(text) return [] if text.blank? text = text.to_s .mb_chars - .normalize(:kd) + .unicode_normalize(:nfkd) .downcase .to_s .gsub(strip_symbols, ' ') # strip symbols From 98cadf2b4f2eef66a50f3a6d80b7289bbcb38985 Mon Sep 17 00:00:00 2001 From: Vadim Kazakov Date: Mon, 25 Nov 2019 17:21:27 -0700 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 628010a..79a85c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.4.0 (next) * Your contribution here. +* [#138](https://github.com/mongoid/mongoid_search/pull/138): Update mongoid::search::util.normalize_keywords - [@yads](https://github.com/yads). * [#132](https://github.com/mongoid/mongoid_search/pull/132): Add RELEASING and CONTRIBUTING - [@rtrv](https://github.com/rtrv). ## 0.3.6