项目搜索优化
This commit is contained in:
parent
3d8571b59e
commit
b34a8d6166
|
@ -156,7 +156,7 @@ class Project < ActiveRecord::Base
|
||||||
where(nil)
|
where(nil)
|
||||||
else
|
else
|
||||||
pattern = "%#{arg.to_s.strip.downcase}%"
|
pattern = "%#{arg.to_s.strip.downcase}%"
|
||||||
where("LOWER(identifier) LIKE :p OR LOWER(name) LIKE :p ", :p => pattern)
|
where("LOWER(name) LIKE :p ", :p => pattern)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
scope :project_entities, -> { where(project_type: ProjectType_project) }
|
scope :project_entities, -> { where(project_type: ProjectType_project) }
|
||||||
|
|
Loading…
Reference in New Issue