From b97b314debc05ed848e41dc0a6362fb64d106b3a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 22 Nov 2019 14:52:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E9=83=A8=E5=8C=85=E6=8B=AC=E6=88=91?= =?UTF-8?q?=E7=9A=84=E6=9C=AA=E5=8F=91=E5=B8=83=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/hacks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/hacks_controller.rb b/app/controllers/hacks_controller.rb index f9052de8a..24f6a7b4a 100644 --- a/app/controllers/hacks_controller.rb +++ b/app/controllers/hacks_controller.rb @@ -163,7 +163,7 @@ class HacksController < ApplicationController hacks = Hack.select(select_sql).mine(current_user.id) else # 全部包括已经发布的,和我的未发布的 - hacks = Hack.select(select_sql).published.opening.merge(Hack.select(select_sql).unpublish.mine(current_user.id)) + hacks = Hack.select(select_sql).published.opening.or(Hack.select(select_sql).unpublish.mine(current_user.id)) end # 搜索 if params[:search]