A platform for community discussion. Free, open, simple.
DEV: include TopicQueryParams in TagsController (#8045)
Osama Sayegh68f87dffa54c
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rbindex b45e5e2f801..7e06d03d6b8 100644--- a/app/controllers/tags_controller.rb+++ b/app/controllers/tags_controller.rb@@ -1,11 +1,13 @@# frozen_string_literal: truerequire_dependency 'topic_list_responder'+require_dependency 'topic_query_params'require_dependency 'topics_bulk_action'require_dependency 'topic_query'class TagsController < ::ApplicationControllerinclude TopicListResponder+ include TopicQueryParamsbefore_action :ensure_tags_enabled@@ -355,7 +357,7 @@ class TagsController < ::ApplicationControllerenddef build_topic_list_options- options = {+ options = super.merge(page: params[:page],topic_ids: param_to_integer_list(:topic_ids),exclude_category_ids: params[:exclude_category_ids],@@ -369,7 +371,7 @@ class TagsController < ::ApplicationControllerstate: params[:state],search: params[:search],q: params[:q]- }+ )options[:no_subcategories] = true if params[:no_subcategories] == 'true'if params[:tag_id] == 'none'