diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-04 09:12:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-04 09:12:56 +0000 |
commit | 191020103bd4d2aad99c62a35201c05d9df74f8f (patch) | |
tree | 83ef6f71fea1f66842545e9af788fdc33d34d48b /app/controllers/explore/projects_controller.rb | |
parent | 5bfd7a344b73d6a9482b420fa7646f7d1760a566 (diff) | |
download | gitlab-ce-191020103bd4d2aad99c62a35201c05d9df74f8f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/explore/projects_controller.rb')
-rw-r--r-- | app/controllers/explore/projects_controller.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb index 81e1643a8f8..14dd2ae5691 100644 --- a/app/controllers/explore/projects_controller.rb +++ b/app/controllers/explore/projects_controller.rb @@ -68,6 +68,11 @@ class Explore::ProjectsController < Explore::ApplicationController end # rubocop: enable CodeReuse/ActiveRecord + def topics + load_project_counts + load_topics + end + def topic load_topic @@ -95,6 +100,10 @@ class Explore::ProjectsController < Explore::ApplicationController prepare_projects_for_rendering(projects) end + def load_topics + @topics = Projects::TopicsFinder.new(params: params.permit(:search)).execute.page(params[:page]).without_count + end + def load_topic @topic = Projects::Topic.find_by_name(params[:topic_name]) end |