mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FIX: regex should behave the same in Ruby and Postgres
This commit is contained in:
@ -103,7 +103,7 @@ class Post < ActiveRecord::Base
|
|||||||
when 'string'
|
when 'string'
|
||||||
where('raw ILIKE ?', "%#{pattern}%")
|
where('raw ILIKE ?', "%#{pattern}%")
|
||||||
when 'regex'
|
when 'regex'
|
||||||
where('raw ~ ?', pattern)
|
where('raw ~ ?', "(?n)#{pattern}")
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user