全站搜索的结果中不重复显示引用的资源

This commit is contained in:
z9hang 2014-12-02 15:41:10 +08:00
parent 78ba3abc23
commit 2fdc6ff988
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ class FilesController < ApplicationController
if sort == ""
sort = "created_on DESC"
end
resultSet = Attachment.where("attachments.container_type IS NOT NULL AND filename LIKE :like ", like: "%#{keywords}%").
resultSet = Attachment.where("attachments.container_type IS NOT NULL AND attachments.copy_from IS NULL AND filename LIKE :like ", like: "%#{keywords}%").
reorder(sort)
end