Make LIKE searches case-insensitive also on PgSQL

This commit is contained in:
Jyri-Petteri Paloposki 2020-09-05 01:24:23 +03:00
parent e89511aec8
commit bbb9fc8809
7 changed files with 21 additions and 11 deletions

View file

@ -2,5 +2,5 @@ class Note < ApplicationRecord
belongs_to :user
belongs_to :project
scope :with_body, lambda { |terms| where("body LIKE ?", terms) }
scope :with_body, lambda { |terms| where("body " + Common.like_operator + " ?", terms) }
end