FIX: regex should behave the same in Ruby and Postgres

This commit is contained in:
Gerhard Schlager 2017-12-21 11:26:38 +01:00
parent 16076f9ab8
commit 727a45185d
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ class Post < ActiveRecord::Base
when 'string'
where('raw ILIKE ?', "%#{pattern}%")
when 'regex'
where('raw ~ ?', pattern)
where('raw ~ ?', "(?n)#{pattern}")
end
}