fixed 搜索用户项目时过虑表情字符

This commit is contained in:
2023-03-09 16:22:48 +08:00
parent d993df7df4
commit 6f7b40ec24
5 changed files with 18 additions and 7 deletions

View File

@@ -240,6 +240,8 @@ class Project < ApplicationRecord
end
def self.search_project(search)
# 表情处理
search = search.to_s.each_char.select { |c| c.bytes.first < 240 }.join('')
ransack(name_or_identifier_cont: search)
end
# 创建者