From ed8a8001f47d000e79783d90c175be1a8d914dbc Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 14 Feb 2017 11:58:43 -0800 Subject: [PATCH] fixes #2859: search:uncategorized should search for uncategorized saved searches --- app/presenters/user_presenter.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb index f35413a06..bb0504a92 100644 --- a/app/presenters/user_presenter.rb +++ b/app/presenters/user_presenter.rb @@ -48,11 +48,7 @@ class UserPresenter return Post.where("false") end - if category == SavedSearch::UNCATEGORIZED_NAME - ids = SavedSearch.post_ids(CurrentUser.user.id) - else - ids = SavedSearch.post_ids(CurrentUser.user.id, category) - end + ids = SavedSearch.post_ids(CurrentUser.user.id, category) if ids.any? arel = Post.where("id in (?)", ids.map(&:to_i)).order("id desc").limit(10)