diff options
author | unarist <m.unarist@gmail.com> | 2017-07-14 02:31:33 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-07-13 19:31:33 +0200 |
commit | c2753fdfb471209fe7f2cdb8844e049207af8ba3 (patch) | |
tree | 398ed4b8eca9fa5c608e214b4b5badf0dedada24 /app | |
parent | c29c20ab3cda3d4b752c67868925c1fe99d0ac71 (diff) |
Make tag search case insensitive again (#4184)
Diffstat (limited to 'app')
-rw-r--r-- | app/models/tag.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/tag.rb b/app/models/tag.rb index 08e3c1b03..a14e2cc98 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -23,7 +23,7 @@ class Tag < ApplicationRecord class << self def search_for(term, limit = 5) pattern = sanitize_sql_like(term) + '%' - Tag.where('name like ?', pattern).order(:name).limit(limit) + Tag.where('lower(name) like lower(?)', pattern).order(:name).limit(limit) end end end |