Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps <info@camilstaps.nl>2019-01-27 12:33:51 +0300
committerCamil Staps <info@camilstaps.nl>2019-08-07 21:49:13 +0300
commit936d4e80e4abc2efcc5d88865d5d420c42a84370 (patch)
tree15e207c4aaaf5916edd50c942b777e33e3794152 /app/controllers
parent71fd79c810257c2d2a183f989d83a77960f59006 (diff)
Add starring date to overview of starrers
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/starrers_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/projects/starrers_controller.rb b/app/controllers/projects/starrers_controller.rb
index 8d5ddd51e4c..5939a3885c6 100644
--- a/app/controllers/projects/starrers_controller.rb
+++ b/app/controllers/projects/starrers_controller.rb
@@ -2,16 +2,19 @@
class Projects::StarrersController < Projects::ApplicationController
include SortingHelper
- #
+
# Authorize
before_action :require_non_empty_project
+ # rubocop: disable CodeReuse/ActiveRecord
def index
@sort = params[:sort].presence || sort_value_name
params[:has_starred] = @project
@starrers = UsersFinder.new(current_user, params).execute
+ @starrers = @starrers.joins(:users_star_projects).select('"users".*, "users_star_projects"."created_at" as "starred_since"')
@starrers = @starrers.sort_by_attribute(@sort)
end
+ # rubocop: enable CodeReuse/ActiveRecord
end