starrers_controller.rb 413 字节
Newer Older
C
Camil Staps 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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