diff --git a/app/controllers/tag_controller.rb b/app/controllers/tag_controller.rb index 4855c384f7..0f1334417f 100644 --- a/app/controllers/tag_controller.rb +++ b/app/controllers/tag_controller.rb @@ -568,4 +568,8 @@ def fetch_counts end def topic_tree; end + + def subtopics + Tag.find_by(name: params[:subtopic]) + render "tags/subtopic", layout: false end diff --git a/config/routes.rb b/config/routes.rb index 88baa62445..c99e73bf5c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -383,6 +383,7 @@ post 'comment/react/update/:id' => 'comment#react_update' get 'topic-tree' => 'tag#topic_tree' + get 'tags/:subtopic' => 'tag#subtopics' # Sample resource route (maps HTTP verbs to controller actions automatically): # resources :products