diff options
Diffstat (limited to 'app/controllers/projects/runners_controller.rb')
-rw-r--r-- | app/controllers/projects/runners_controller.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/controllers/projects/runners_controller.rb b/app/controllers/projects/runners_controller.rb index 6cb6e3ef6d4..bfbcf2567f3 100644 --- a/app/controllers/projects/runners_controller.rb +++ b/app/controllers/projects/runners_controller.rb @@ -6,11 +6,10 @@ class Projects::RunnersController < Projects::ApplicationController layout 'project_settings' def index - @runners = @ci_project.runners.order('id DESC') - @specific_runners = - Ci::Runner.specific.includes(:runner_projects). - where(Ci::RunnerProject.table_name => { project_id: current_user.authorized_projects } ). - where.not(id: @runners).order("#{Ci::Runner.table_name}.id DESC").page(params[:page]).per(20) + @runners = @ci_project.runners.ordered + @specific_runners = current_user.ci_authorized_runners. + where.not(id: @ci_project.runners). + ordered.page(params[:page]).per(20) @shared_runners = Ci::Runner.shared.active @shared_runners_count = @shared_runners.count(:all) end @@ -60,6 +59,6 @@ class Projects::RunnersController < Projects::ApplicationController end def runner_params - params.require(:runner).permit(:description, :tag_list, :contacted_at, :active) + params.require(:runner).permit(:description, :tag_list, :active) end end |