diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-11-16 21:01:07 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-16 21:01:07 -0600 |
commit | 1132af15151713f52d8d1e320271185865a79633 (patch) | |
tree | c7d5dd6afb7a60c840a0d3238124f01c747eada8 /app/helpers/search_helper.rb | |
parent | 487c945d160e9349579bf541147c949f8bca3c46 (diff) |
Moved to using a normalized text column for searches. Admins using an FTS-enabled version of Monsterfork will need to apply the migration from `dist/search.sql` then run `bundle exec rails monsterfork:index_statuses`.
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r-- | app/helpers/search_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 96da161f1..0f3d09c36 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -1,6 +1,7 @@ -module SearchHelper +require 'sixarm_ruby_unaccent' +module SearchHelper def expand_search_query(query) - query.gsub(/"(.*)"/, '\\y\1\\y') + query.downcase.unaccent.gsub(/"(.*)"/, '\\y\1\\y') end end |