项目搜索优化

This commit is contained in:
nwb 2014-07-16 17:25:47 +08:00
parent 3d8571b59e
commit b34a8d6166
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ class Project < ActiveRecord::Base
where(nil)
else
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
}
scope :project_entities, -> { where(project_type: ProjectType_project) }