mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 21:06:01 +01:00
Use Arel matches
method in CustomEmoji search (#28615)
This commit is contained in:
parent
cc67943df2
commit
e827c4692c
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ class CustomEmoji < ApplicationRecord
|
|||
end
|
||||
|
||||
def search(shortcode)
|
||||
where('"custom_emojis"."shortcode" ILIKE ?', "%#{shortcode}%")
|
||||
where(arel_table[:shortcode].matches("%#{sanitize_sql_like(shortcode)}%"))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue