From 2fdc6ff9880de3ed20e5911cf54de77154f6ed71 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 2 Dec 2014 15:41:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E7=AB=99=E6=90=9C=E7=B4=A2=E7=9A=84?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=AD=E4=B8=8D=E9=87=8D=E5=A4=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=BC=95=E7=94=A8=E7=9A=84=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 320c8fc93..1ed40f691 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -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