diff options
author | Camil Staps <info@camilstaps.nl> | 2019-01-25 23:53:00 +0300 |
---|---|---|
committer | Camil Staps <info@camilstaps.nl> | 2019-08-07 21:49:13 +0300 |
commit | 59976090b52d401dc4d23b726b2168186524f269 (patch) | |
tree | 503fb6f0563c866ea1776be3f5ad6bf88672ae92 /app/controllers | |
parent | 5b20df0a9276bc1250dc8b307adb161b24d9c255 (diff) |
Add /starrers view for projects
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/starrers_controller.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/projects/starrers_controller.rb b/app/controllers/projects/starrers_controller.rb new file mode 100644 index 00000000000..8d5ddd51e4c --- /dev/null +++ b/app/controllers/projects/starrers_controller.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class Projects::StarrersController < Projects::ApplicationController + include SortingHelper + # + # Authorize + before_action :require_non_empty_project + + def index + @sort = params[:sort].presence || sort_value_name + + params[:has_starred] = @project + + @starrers = UsersFinder.new(current_user, params).execute + @starrers = @starrers.sort_by_attribute(@sort) + end +end |