全站搜索的结果中不重复显示引用的资源
This commit is contained in:
parent
78ba3abc23
commit
2fdc6ff988
|
@ -93,7 +93,7 @@ class FilesController < ApplicationController
|
||||||
if sort == ""
|
if sort == ""
|
||||||
sort = "created_on DESC"
|
sort = "created_on DESC"
|
||||||
end
|
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)
|
reorder(sort)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue