|
|
|
@ -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]
|
|
|
|
|