Skip to content

Commit

Permalink
Fixes publiclab#11379: Made the subtopics method
Browse files Browse the repository at this point in the history
  • Loading branch information
KarishmaVanwari committed Sep 2, 2022
1 parent b97078c commit 669acd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/tag_controller.rb
Expand Up @@ -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
1 change: 1 addition & 0 deletions config/routes.rb
Expand Up @@ -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
Expand Down

0 comments on commit 669acd0

Please sign in to comment.