class Api::V1::Issues::AuthorsController < Api::V1::BaseController before_action :require_public_and_member_above, only: [:index] # 发布人列表 def index @authors = User.joins(issues: :project).where(projects: {id: @project&.id}) @authors = @authors.order("users.id=#{current_user.id} desc").distinct @authors = @authors.ransack(login_or_nickname_cont: params[:keyword]).result if params[:keyword].present? @authors = kaminary_select_paginate(@authors) end end