diff options
author | George Tsiolis <tsiolis.g@gmail.com> | 2018-12-07 13:05:17 +0300 |
---|---|---|
committer | George Tsiolis <tsiolis.g@gmail.com> | 2019-01-15 21:07:19 +0300 |
commit | 23f0020be0fa9dc6c09cd841a246f182677a0897 (patch) | |
tree | 65bf4f1319c537fb0505f8eca439e88ba9fe3dca /app/controllers/explore | |
parent | e8d971735b2d48b85b6195104eef46b0bc42206d (diff) |
Move ProjectsFinder into the controller
Diffstat (limited to 'app/controllers/explore')
-rw-r--r-- | app/controllers/explore/projects_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb index 778fdda8dbd..9f074690cbc 100644 --- a/app/controllers/explore/projects_controller.rb +++ b/app/controllers/explore/projects_controller.rb @@ -55,6 +55,9 @@ class Explore::ProjectsController < Explore::ApplicationController # rubocop: disable CodeReuse/ActiveRecord def load_projects + @total_user_projects_count = ProjectsFinder.new(params: { non_public: true }, current_user: current_user).execute + @total_starred_projects_count = ProjectsFinder.new(params: { starred: true }, current_user: current_user).execute + projects = ProjectsFinder.new(current_user: current_user, params: params) .execute .includes(:route, :creator, :group, namespace: [:route, :owner]) |