DEV: Introduce TopicsFilter#filter_tags method (#20839)

This change sets the ground work for allowing us to filter topics list
by tags in the following ways:

1. Filter for topics that matches all tags in a given set of tags
2. Filter for topics that matches any tags in a given set of tags
3. Exclude topics that matches all tags in a given set of tags
4. Exclude topics that matches any tags in a given set of tags
This commit is contained in:
Alan Guo Xiang Tan
2023-03-27 14:16:53 +08:00
committed by GitHub
parent e0cf2849fd
commit dd88fdeabc
3 changed files with 226 additions and 51 deletions

View File

@ -799,7 +799,7 @@ class TopicQuery
scope: result,
guardian: @guardian,
category_id: options[:category],
).filter(status: options[:status])
).filter_status(status: options[:status])
end
if (filter = (options[:filter] || options[:f])) && @user