add references to user statistics page about saved searches

This commit is contained in:
r888888888
2017-01-20 16:42:17 -08:00
parent 48e66cddbb
commit c7b5a4e229
4 changed files with 23 additions and 4 deletions

View File

@@ -19,6 +19,8 @@ module PostSetPresenters
related_tags_for_single(post_set.unordered_tag_array.first)
elsif post_set.tag_string =~ /(?:^|\s)(?:#{Tag::SUBQUERY_METATAGS}):\S+/
calculate_related_tags_from_post_set
elsif post_set.tag_string =~ /search:/
saved_search_tags
elsif post_set.is_empty_tag?
popular_tags
else
@@ -52,6 +54,10 @@ module PostSetPresenters
RelatedTagCalculator.calculate_from_post_set_to_array(post_set).map(&:first)
end
def saved_search_tags
SavedSearch.categories_for(CurrentUser.user).map {|x| "search:#{x}"}
end
def tag_list_html(template, options = {})
tag_set_presenter.tag_list_html(template, options)
end