mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 19:55:56 +08:00
fixed 搜索用户项目时过虑表情字符
This commit is contained in:
@@ -73,8 +73,10 @@ class Api::V1::Users::Projects::ListService < ApplicationService
|
||||
end
|
||||
|
||||
|
||||
projects = projects.with_project_type(project_type)
|
||||
projects = projects.with_project_type(project_type)
|
||||
|
||||
# 表情处理
|
||||
search = search.to_s.each_char.select { |c| c.bytes.first < 240 }.join('')
|
||||
q = projects.ransack(name_or_identifier_cont: search)
|
||||
|
||||
scope = q.result.includes(:project_category, :project_language,:owner, :repository, :has_pinned_users)
|
||||
|
||||
Reference in New Issue
Block a user