hide saved search functionality if not enabled

This commit is contained in:
Albert Yi
2016-12-21 11:54:43 -08:00
parent ee4ebce4d7
commit 62956be384
14 changed files with 198 additions and 104 deletions

View File

@@ -44,6 +44,10 @@ class UserPresenter
end
def posts_for_saved_search_category(category)
if !SavedSearch.enabled?
return Post.where("false")
end
if category == SavedSearch::UNCATEGORIZED_NAME
ids = SavedSearch.post_ids(CurrentUser.user.id)
else